File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler-rt/cmake/Modules Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,8 @@ function(add_compiler_rt_runtime name type)
388
388
set_target_properties (${libname} PROPERTIES IMPORT_PREFIX "" )
389
389
set_target_properties (${libname} PROPERTIES IMPORT_SUFFIX ".lib" )
390
390
endif ()
391
- if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*" )
391
+ find_program (CODESIGN codesign )
392
+ if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*" AND CODESIGN )
392
393
# Apple's linker signs the resulting dylib with an ad-hoc code signature in
393
394
# most situations, except:
394
395
# 1. Versions of ld64 prior to ld64-609 in Xcode 12 predate this behavior.
@@ -403,7 +404,7 @@ function(add_compiler_rt_runtime name type)
403
404
# argument and looking for `invalid argument "linker-signed"` in its output.
404
405
# FIXME: Remove this once all supported toolchains support `-o linker-signed`.
405
406
execute_process (
406
- COMMAND sh -c "codesign -f -s - -o linker-signed this-does-not-exist 2>&1 | grep -q linker-signed"
407
+ COMMAND sh -c "${CODESIGN} -f -s - -o linker-signed this-does-not-exist 2>&1 | grep -q linker-signed"
407
408
RESULT_VARIABLE CODESIGN_SUPPORTS_LINKER_SIGNED
408
409
)
409
410
@@ -414,7 +415,7 @@ function(add_compiler_rt_runtime name type)
414
415
415
416
add_custom_command (TARGET ${libname}
416
417
POST_BUILD
417
- COMMAND codesign --sign - ${EXTRA_CODESIGN_ARGUMENTS} $< TARGET_FILE:${libname} >
418
+ COMMAND ${CODESIGN} --sign - ${EXTRA_CODESIGN_ARGUMENTS} $< TARGET_FILE:${libname} >
418
419
WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR}
419
420
COMMAND_EXPAND_LISTS
420
421
)
You can’t perform that action at this time.
0 commit comments