Skip to content

Commit fd6118a

Browse files
committed
[CMake] fix runpath for ELF platforms
Remove the absolute path to the host toolchain's stdlib from libXCTest.so.
1 parent 1764c54 commit fd6118a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
5656
target_link_libraries(XCTest PRIVATE
5757
dispatch
5858
Foundation)
59+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
60+
target_link_options(XCTest PRIVATE "SHELL:-no-toolchain-stdlib-rpath")
61+
endif()
5962
endif()
6063
set_target_properties(XCTest PROPERTIES
6164
Swift_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swift

0 commit comments

Comments
 (0)