Skip to content

Commit a3e6d24

Browse files
authored
Merge pull request #2759 from DougGregor/bootstrap-always-test-integrated-driver
[Bootstrap] Bootstrap & test with the integrated Swift driver.
2 parents b0b3228 + 21f0c04 commit a3e6d24

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

Utilities/bootstrap

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def build(args):
282282
build_yams(args)
283283
build_swift_driver(args)
284284
build_swiftpm_with_cmake(args)
285-
build_swiftpm_with_swiftpm(args)
285+
build_swiftpm_with_swiftpm(args,integrated_swift_driver=False)
286286

287287
def test(args):
288288
"""Builds SwiftPM, then tests itself."""
@@ -303,6 +303,19 @@ def test(args):
303303
# Test SwiftPM.
304304
call_swiftpm(args, cmd)
305305

306+
# Build SwiftPM with the integrated driver.
307+
note("Bootstrap with the integrated Swift driver")
308+
build_swiftpm_with_swiftpm(args,integrated_swift_driver=True)
309+
310+
# Test SwiftPM with the integrated driver. Only the build and
311+
# functional tests are interesting.
312+
integratedDriverCmd = cmd
313+
integratedDriverCmd.append("--use-integrated-swift-driver")
314+
if args.filter:
315+
integratedDriverCmd.append("--filter")
316+
integratedDriverCmd.append("BuildTests;FunctionalTests")
317+
call_swiftpm(args, integratedDriverCmd)
318+
306319
def install(args):
307320
"""Builds SwiftPM, then installs its build products."""
308321
build(args)
@@ -508,16 +521,20 @@ def build_swiftpm_with_cmake(args):
508521
add_rpath_for_cmake_build(args, os.path.join(args.yams_build_dir, "lib"))
509522
add_rpath_for_cmake_build(args, os.path.join(args.swift_driver_build_dir, "lib"))
510523

511-
def build_swiftpm_with_swiftpm(args):
524+
def build_swiftpm_with_swiftpm(args, integrated_swift_driver):
512525
"""Builds SwiftPM using the version of SwiftPM built with CMake."""
513526
note("Building SwiftPM (with swift-build)")
514527

515-
call_swiftpm(args, [
528+
swiftpm_args = [
516529
"SWIFT_EXEC=" + args.swiftc_path,
517530
"SWIFTPM_PD_LIBS=" + os.path.join(args.bootstrap_dir, "pm"),
518531
os.path.join(args.bootstrap_dir, "bin/swift-build"),
519532
"--disable-sandbox",
520-
])
533+
]
534+
if integrated_swift_driver:
535+
swiftpm_args.append("--use-integrated-swift-driver")
536+
537+
call_swiftpm(args, swiftpm_args)
521538

522539
# Setup symlinks that'll allow using swiftpm from the build directory.
523540
symlink_force(args.swiftc_path, os.path.join(args.target_dir, args.conf, "swiftc"))

0 commit comments

Comments
 (0)