diff options
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}" ) |