@@ -558,14 +558,6 @@ def add_rpath_for_cmake_build(args, rpath):
558
558
note (' ' .join (add_rpath_cmd ))
559
559
subprocess .call (add_rpath_cmd , stderr = subprocess .PIPE )
560
560
561
- def get_swift_backdeploy_library_paths (args ):
562
- if platform .system () == 'Darwin' :
563
- # Need to include backwards compatibility libraries for Concurrency
564
- # FIXME: Would be nice if we could get this from `swiftc -print-target-info`
565
- return ['/usr/lib/swift' , args .target_info ["paths" ]["runtimeLibraryPaths" ][0 ] + '/../../swift-5.5/macosx' ]
566
- else :
567
- return []
568
-
569
561
def build_swiftpm_with_cmake (args ):
570
562
"""Builds SwiftPM using CMake."""
571
563
note ("Building SwiftPM (with CMake)" )
@@ -597,10 +589,6 @@ def build_swiftpm_with_cmake(args):
597
589
add_rpath_for_cmake_build (args , os .path .join (args .build_dirs ["swift-system" ], "lib" ))
598
590
add_rpath_for_cmake_build (args , os .path .join (args .build_dirs ["swift-collections" ], "lib" ))
599
591
600
- # rpaths for compatibility libraries
601
- for lib_path in get_swift_backdeploy_library_paths (args ):
602
- add_rpath_for_cmake_build (args , lib_path )
603
-
604
592
def build_swiftpm_with_swiftpm (args , integrated_swift_driver ):
605
593
"""Builds SwiftPM using the version of SwiftPM built with CMake."""
606
594
@@ -696,7 +684,7 @@ def get_swiftpm_env_cmd(args):
696
684
env_cmd .append ("SWIFTPM_MACOS_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target )
697
685
698
686
if args .bootstrap :
699
- library_paths = [
687
+ libs_joined = ":" . join ( [
700
688
os .path .join (args .bootstrap_dir , "lib" ),
701
689
os .path .join (args .build_dirs ["tsc" ], "lib" ),
702
690
os .path .join (args .build_dirs ["llbuild" ], "lib" ),
@@ -706,14 +694,11 @@ def get_swiftpm_env_cmd(args):
706
694
os .path .join (args .build_dirs ["swift-crypto" ], "lib" ),
707
695
os .path .join (args .build_dirs ["swift-system" ], "lib" ),
708
696
os .path .join (args .build_dirs ["swift-collections" ], "lib" ),
709
- ]
697
+ ] + args . target_info [ "paths" ][ "runtimeLibraryPaths" ])
710
698
711
699
if platform .system () == 'Darwin' :
712
- # Does not include Swift runtime library paths because of rdar://75752698
713
- libs_joined = ":" .join (library_paths )
714
700
env_cmd .append ("DYLD_LIBRARY_PATH=%s" % libs_joined )
715
701
else :
716
- libs_joined = ":" .join (library_paths + args .target_info ["paths" ]["runtimeLibraryPaths" ])
717
702
env_cmd .append ("LD_LIBRARY_PATH=%s" % libs_joined )
718
703
719
704
return env_cmd
@@ -753,10 +738,6 @@ def get_swiftpm_flags(args):
753
738
# toolchains that include libraries not part of the OS (e.g. PythonKit or
754
739
# TensorFlow).
755
740
if platform .system () == "Darwin" :
756
- # rpaths for compatibility libraries
757
- for lib_path in get_swift_backdeploy_library_paths (args ):
758
- build_flags .extend (["-Xlinker" , "-rpath" , "-Xlinker" , lib_path ])
759
-
760
741
swift_library_rpath_prefix = "@executable_path/../"
761
742
elif platform .system () == 'Linux' or platform .system () == 'OpenBSD' :
762
743
# `$ORIGIN` is an ELF construct.
0 commit comments