File tree Expand file tree Collapse file tree 4 files changed +11
-13
lines changed Expand file tree Collapse file tree 4 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -448,13 +448,9 @@ include(SwiftList)
448
448
swift_configure_components ()
449
449
450
450
# lipo is used to create universal binaries.
451
- if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
452
- include (SwiftDarwin )
453
- if (SWIFT_LIPO )
454
- set (LIPO ${SWIFT_LIPO} )
455
- else ()
456
- find_toolchain_tool (LIPO "${SWIFT_DARWIN_XCRUN_TOOLCHAIN} " lipo )
457
- endif ()
451
+ include (SwiftToolchainUtils )
452
+ if (NOT SWIFT_LIPO )
453
+ find_toolchain_tool (SWIFT_LIPO "${SWIFT_DARWIN_XCRUN_TOOLCHAIN} " lipo )
458
454
endif ()
459
455
460
456
if ("${SWIFT_NATIVE_LLVM_TOOLS_PATH} " STREQUAL "" )
Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ function(_add_swift_lipo_target)
548
548
endif ()
549
549
# Use lipo to create the final binary.
550
550
add_custom_command_target (unused_var
551
- COMMAND "${LIPO } " "-create" "-output" "${LIPO_OUTPUT} " ${source_binaries}
551
+ COMMAND "${SWIFT_LIPO } " "-create" "-output" "${LIPO_OUTPUT} " ${source_binaries}
552
552
${codesign_command}
553
553
CUSTOM_TARGET_NAME "${LIPO_TARGET} "
554
554
OUTPUT "${LIPO_OUTPUT} "
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ list(APPEND CMAKE_MODULE_PATH
32
32
${LLVM_CMAKE_MODULES_PATH}
33
33
)
34
34
35
- message (STATUS "FINDING LIPO" )
36
- execute_process (
37
- COMMAND "xcrun" "-find" "lipo"
38
- OUTPUT_VARIABLE LIPO
39
- OUTPUT_STRIP_TRAILING_WHITESPACE )
35
+ set (SWIFT_DARWIN_XCRUN_TOOLCHAIN "XcodeDefault" CACHE STRING
36
+ "The name of the toolchain to pass to 'xcrun'" )
37
+
38
+ include (SwiftToolchainUtils )
39
+ if (NOT SWIFT_LIPO )
40
+ find_toolchain_tool (SWIFT_LIPO "${SWIFT_DARWIN_XCRUN_TOOLCHAIN} " lipo )
41
+ endif ()
40
42
41
43
include (AddLLVM )
42
44
include (SwiftUtils )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments