From 34f2b587f3512d3974d73b316e565194df34eea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksey=20Kliger=20=28=CE=BBgeek=29?= Date: Mon, 4 Apr 2022 22:02:34 -0400 Subject: 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 --- eng/native/functions.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'eng/native/functions.cmake') 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}" ) -- cgit v1.2.3