File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Sources/PackageDescription Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ foreach(PACKAGE_DESCRIPTION_VERSION 4 4_2)
47
47
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
48
48
target_link_libraries (PD${PACKAGE_DESCRIPTION_VERSION} PRIVATE
49
49
Foundation )
50
+ target_link_options (PD${PACKAGE_DESCRIPTION_VERSION} PRIVATE
51
+ "SHELL:-no-toolchain-stdlib-rpath" )
50
52
endif ()
51
53
52
54
if (CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin )
Original file line number Diff line number Diff line change @@ -610,6 +610,11 @@ def get_swiftpm_flags(args):
610
610
elif cross_compile_hosts :
611
611
error ("cannot cross-compile for %s" % cross_compile_hosts )
612
612
613
+ # On ELF platforms, remove the host toolchain's stdlib absolute rpath from
614
+ # installed executables and shared libraries.
615
+ if platform .system () != "Darwin" and args .command == 'install' :
616
+ build_flags .extend (["-Xswiftc" , "-no-toolchain-stdlib-rpath" ])
617
+
613
618
return build_flags
614
619
615
620
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments