Skip to content

Commit 19b95e6

Browse files
committed
[CMake] Use 'SWIFT_HOST_TRIPLE' to set '-target'
1 parent 87d268f commit 19b95e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/modules/AddSwiftHostLibrary.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ function(add_swift_syntax_library name)
8383
$<$<COMPILE_LANGUAGE:Swift>:-wmo>)
8484
endif()
8585

86+
if(SWIFT_HOST_TRIPLE)
87+
target_compile_options("${name}" PRIVATE
88+
$<$<COMPILE_LANGUAGE:Swift>:-target;${SWIFT_HOST_TRIPLE};>
89+
)
90+
endif()
91+
8692
if(LLVM_USE_LINKER)
8793
target_link_options(${name} PRIVATE
8894
"-use-ld=${LLVM_USE_LINKER}"

0 commit comments

Comments
 (0)