Skip to content

Commit ba596a6

Browse files
authored
Revert "Do not test inferior Swift libraries on Darwin (#5611)" (#5617)
This reverts commit d045aa6.
1 parent d045aa6 commit ba596a6

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

Utilities/bootstrap

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -558,14 +558,6 @@ def add_rpath_for_cmake_build(args, rpath):
558558
note(' '.join(add_rpath_cmd))
559559
subprocess.call(add_rpath_cmd, stderr=subprocess.PIPE)
560560

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-
569561
def build_swiftpm_with_cmake(args):
570562
"""Builds SwiftPM using CMake."""
571563
note("Building SwiftPM (with CMake)")
@@ -597,10 +589,6 @@ def build_swiftpm_with_cmake(args):
597589
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-system"], "lib"))
598590
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-collections"], "lib"))
599591

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-
604592
def build_swiftpm_with_swiftpm(args, integrated_swift_driver):
605593
"""Builds SwiftPM using the version of SwiftPM built with CMake."""
606594

@@ -696,7 +684,7 @@ def get_swiftpm_env_cmd(args):
696684
env_cmd.append("SWIFTPM_MACOS_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target)
697685

698686
if args.bootstrap:
699-
library_paths = [
687+
libs_joined = ":".join([
700688
os.path.join(args.bootstrap_dir, "lib"),
701689
os.path.join(args.build_dirs["tsc"], "lib"),
702690
os.path.join(args.build_dirs["llbuild"], "lib"),
@@ -706,14 +694,11 @@ def get_swiftpm_env_cmd(args):
706694
os.path.join(args.build_dirs["swift-crypto"], "lib"),
707695
os.path.join(args.build_dirs["swift-system"], "lib"),
708696
os.path.join(args.build_dirs["swift-collections"], "lib"),
709-
]
697+
] + args.target_info["paths"]["runtimeLibraryPaths"])
710698

711699
if platform.system() == 'Darwin':
712-
# Does not include Swift runtime library paths because of rdar://75752698
713-
libs_joined = ":".join(library_paths)
714700
env_cmd.append("DYLD_LIBRARY_PATH=%s" % libs_joined)
715701
else:
716-
libs_joined = ":".join(library_paths + args.target_info["paths"]["runtimeLibraryPaths"])
717702
env_cmd.append("LD_LIBRARY_PATH=%s" % libs_joined)
718703

719704
return env_cmd
@@ -753,10 +738,6 @@ def get_swiftpm_flags(args):
753738
# toolchains that include libraries not part of the OS (e.g. PythonKit or
754739
# TensorFlow).
755740
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-
760741
swift_library_rpath_prefix = "@executable_path/../"
761742
elif platform.system() == 'Linux' or platform.system() == 'OpenBSD':
762743
# `$ORIGIN` is an ELF construct.

0 commit comments

Comments
 (0)