Skip to content

Commit ca612ef

Browse files
committed
[Bootstrap] Set (DY)LD_LIBRARY_PATH even if not bootstrapping.
We should set `(DY)LD_LIBRARY_PATH` if we need to, even if we aren't bootstrapping. rdar://160273124
1 parent 75de050 commit ca612ef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Utilities/bootstrap

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,9 @@ def get_swiftpm_env_cmd(args):
879879
if not '-macosx' in args.build_target and args.command == 'install':
880880
env_cmd.append("SWIFTCI_INSTALL_RPATH_OS=%s" % args.platform_path.group(2))
881881

882+
libs = []
882883
if args.bootstrap:
883-
libs = [
884+
libs += [
884885
os.path.join(args.bootstrap_dir, "lib"),
885886
os.path.join(args.build_dirs["tsc"], "lib"),
886887
os.path.join(args.build_dirs["llbuild"], "lib"),
@@ -894,9 +895,10 @@ def get_swiftpm_env_cmd(args):
894895
os.path.join(args.build_dirs["swift-build"], "lib"),
895896
]
896897

897-
if args.extra_dynamic_library_path:
898-
libs.append(args.extra_dynamic_library_path)
898+
if args.extra_dynamic_library_path:
899+
libs.append(args.extra_dynamic_library_path)
899900

901+
if libs:
900902
if platform.system() == 'Darwin':
901903
env_cmd.append("DYLD_LIBRARY_PATH=%s" % ":".join(libs))
902904
else:

0 commit comments

Comments
 (0)