Skip to content

Commit

Permalink
[release/6.0] Don't pass --minimize to Xcode 13.3 dsymutil (#81042)
Browse files Browse the repository at this point in the history
* Don't pass --minimize to Xcode 13.3 dsymutil

Fixes #66770

New xcode command line tools dropped support for the `--minimize` option (which
is now the default).

The related LLVM change is llvm/llvm-project@5d07dc8

Co-Authored-By: Kevin Jones <vcsjones@github.com>

* fix build with older Xcodes

use a list of options, not a single option with a space in it

---------

Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
Co-authored-by: Kevin Jones <vcsjones@github.com>
  • Loading branch information
3 people authored Feb 8, 2023
1 parent a58e25a commit aea0710
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion eng/native/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,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}"
)
Expand Down

0 comments on commit aea0710

Please sign in to comment.