diff options
author | Aleksey Kliger (λgeek) <alklig@microsoft.com> | 2022-04-05 05:02:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 05:02:34 +0300 |
commit | 34f2b587f3512d3974d73b316e565194df34eea3 (patch) | |
tree | 9bc28115a3b915a692f7ebc1f5316663e8108f67 /eng/native/functions.cmake | |
parent | 4fed599fe7b7ebea8886d3c987c45e7520ba0fa3 (diff) |
Don't pass --minimize to Xcode 13.3 dsymutil (#67543)
* Don't pass --minimize to Xcode 13.3 dsymutil
Fixes https://github.com/dotnet/runtime/issues/66770
New xcode command line tools dropped support for the `--minimize` option (which
is now the default).
The related LLVM change is https://github.com/llvm/llvm-project/commit/5d07dc897707f877c45cab6c7e4b65dad7d3ff6d
* fix build with older Xcodes
use a list of options, not a single option with a space in it
Co-authored-by: Kevin Jones <vcsjones@github.com>
Diffstat (limited to 'eng/native/functions.cmake')
-rw-r--r-- | eng/native/functions.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 6ff45a86fbb..d5a28fec536 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -397,11 +397,21 @@ function(strip_symbols targetName outputFilename) set(strip_command) endif () + execute_process( + COMMAND ${DSYMUTIL} --help + OUTPUT_VARIABLE DSYMUTIL_HELP_OUTPUT + ) + + set(DSYMUTIL_OPTS "--flat") + if ("${DSYMUTIL_HELP_OUTPUT}" MATCHES "--minimize") + list(APPEND DSYMUTIL_OPTS "--minimize") + endif () + add_custom_command( TARGET ${targetName} POST_BUILD VERBATIM - COMMAND ${DSYMUTIL} --flat --minimize ${strip_source_file} + COMMAND ${DSYMUTIL} ${DSYMUTIL_OPTS} ${strip_source_file} COMMAND ${strip_command} COMMENT "Stripping symbols from ${strip_source_file} into file ${strip_destination_file}" ) |