Skip to content

Commit 53446da

Browse files
committed
SR-7154: swiftpm tests fail if --debug-foundation option is used.
- Add a --swift-lib-dir so that tests can find libswiftSwiftOnone.so which is required by libFoundation.so - The path to the libraries in the swift build directory are passed to the test programs via the environment using LD_LIBRARY_PATH.
1 parent 20b120d commit 53446da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Utilities/bootstrap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,9 @@ def main():
816816
parser.add_argument("--swiftc", dest="swiftc_path",
817817
help="path to the swift compiler [%(default)s]",
818818
metavar="PATH")
819+
parser.add_argument("--swift-lib-dir", dest="swift_lib_dir",
820+
help="path to the swift built library directory",
821+
metavar="PATH")
819822
parser.add_argument("--sbt", dest="sbt_path",
820823
help="path to the 'swift-build-tool' tool "
821824
"[%(default)s]",
@@ -1052,6 +1055,9 @@ def main():
10521055

10531056
env_cmd = ["env", "SWIFT_EXEC=" + os.path.join(bindir, "swiftc"),
10541057
"SWIFTPM_BUILD_DIR=" + build_path]
1058+
1059+
if args.swift_lib_dir:
1060+
env_cmd.append("LD_LIBRARY_PATH=" + args.swift_lib_dir)
10551061
if args.sysroot:
10561062
env_cmd.append("SYSROOT=" + args.sysroot)
10571063
cmd = env_cmd + [bootstrapped_product] + build_flags

0 commit comments

Comments
 (0)