Skip to content

Commit 90ac9c8

Browse files
committed
[Linux][Build] Use host swiftrt.o when in HOSTTOOLS mode.
When we're building with host tools, we should use the host's swiftrt.o and not the one we've just built when we're trying to build tools that we will run on the host system. rdar://115774613
1 parent 4ea0d20 commit 90ac9c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
540540
get_filename_component(swift_bin_dir ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
541541
get_filename_component(swift_dir ${swift_bin_dir} DIRECTORY)
542542
set(host_lib_dir "${swift_dir}/lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
543+
set(swiftrt "${host_lib_dir}/${SWIFT_HOST_VARIANT_ARCH}/swiftrt.o")
543544
544545
target_link_libraries(${target} PRIVATE ${swiftrt})
545546
target_link_libraries(${target} PRIVATE "swiftCore")

0 commit comments

Comments
 (0)