Skip to content

Commit 4f2bca3

Browse files
committed
Do not test inferior Swift libraries on Darwin
On platforms with ABI-stable Swift runtime libraries (currently only Darwin), we should not set `DYLD_LIBRARY_PATHS` to include the inferior Swift libs in `bootstrap` because compatibility issues can arise from SwiftPM's use of Foundation (which itself is a client of the stdlib) and from using dyld4 (which is used on macOS 12+). rdar://88475529
1 parent 33e05c7 commit 4f2bca3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Utilities/bootstrap

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def get_swiftpm_env_cmd(args):
684684
env_cmd.append("SWIFTPM_MACOS_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target)
685685

686686
if args.bootstrap:
687-
libs_joined = ":".join([
687+
library_paths = [
688688
os.path.join(args.bootstrap_dir, "lib"),
689689
os.path.join(args.build_dirs["tsc"], "lib"),
690690
os.path.join(args.build_dirs["llbuild"], "lib"),
@@ -694,11 +694,14 @@ def get_swiftpm_env_cmd(args):
694694
os.path.join(args.build_dirs["swift-crypto"], "lib"),
695695
os.path.join(args.build_dirs["swift-system"], "lib"),
696696
os.path.join(args.build_dirs["swift-collections"], "lib"),
697-
] + args.target_info["paths"]["runtimeLibraryPaths"])
697+
]
698698

699699
if platform.system() == 'Darwin':
700+
# Does not include Swift runtime library paths because of rdar://75752698
701+
libs_joined = ":".join(library_paths)
700702
env_cmd.append("DYLD_LIBRARY_PATH=%s" % libs_joined)
701703
else:
704+
libs_joined = ":".join(library_paths + args.target_info["paths"]["runtimeLibraryPaths"])
702705
env_cmd.append("LD_LIBRARY_PATH=%s" % libs_joined)
703706

704707
return env_cmd

0 commit comments

Comments
 (0)