Skip to content

Commit 8f7b303

Browse files
committed
Set host libraries rpath correctly for bootstrapped builds
1 parent 35ed6f6 commit 8f7b303

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,9 +912,17 @@ function(add_swift_host_tool executable)
912912
endif()
913913
914914
if(SWIFT_SWIFT_PARSER)
915+
set(extra_relative_rpath "")
916+
if(NOT ${ASHT_BOOTSTRAPPING} STREQUAL "")
917+
if (${executable} MATCHES "-bootstrapping")
918+
set(extra_relative_rpath "../")
919+
endif()
920+
endif()
921+
915922
set_property(
916923
TARGET ${executable}
917-
APPEND PROPERTY INSTALL_RPATH "@executable_path/../lib/swift/host")
924+
APPEND PROPERTY INSTALL_RPATH
925+
"@executable_path/../${extra_relative_rpath}lib/swift/host")
918926
endif()
919927
920928
if(ASHT_THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY)

0 commit comments

Comments
 (0)