Skip to content

Commit dc71116

Browse files
authored
Ask the swift compiler for SWIFT_HOST_MODULE_TRIPLE if not supplied
1 parent 3ec17e0 commit dc71116

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ if("${SWIFT_HOST_MODULE_TRIPLE}" STREQUAL "")
7777
message(FATAL_ERROR "Unrecognized architecture for Windows host")
7878
endif()
7979
else()
80-
message(FATAL_ERROR "Host module triple required")
80+
execute_process(COMMAND ${CMAKE_Swift_COMPILER} -print-target-info OUTPUT_VARIABLE target_info)
81+
string(JSON SWIFT_HOST_MODULE_TRIPLE GET ${target_info} target moduleTriple)
8182
endif()
8283
endif()
8384
message(STATUS "Module triple: ${SWIFT_HOST_MODULE_TRIPLE}")

0 commit comments

Comments
 (0)