@@ -282,7 +282,7 @@ def build(args):
282
282
build_yams (args )
283
283
build_swift_driver (args )
284
284
build_swiftpm_with_cmake (args )
285
- build_swiftpm_with_swiftpm (args )
285
+ build_swiftpm_with_swiftpm (args , integrated_swift_driver = False )
286
286
287
287
def test (args ):
288
288
"""Builds SwiftPM, then tests itself."""
@@ -303,6 +303,19 @@ def test(args):
303
303
# Test SwiftPM.
304
304
call_swiftpm (args , cmd )
305
305
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
+
306
319
def install (args ):
307
320
"""Builds SwiftPM, then installs its build products."""
308
321
build (args )
@@ -508,16 +521,20 @@ def build_swiftpm_with_cmake(args):
508
521
add_rpath_for_cmake_build (args , os .path .join (args .yams_build_dir , "lib" ))
509
522
add_rpath_for_cmake_build (args , os .path .join (args .swift_driver_build_dir , "lib" ))
510
523
511
- def build_swiftpm_with_swiftpm (args ):
524
+ def build_swiftpm_with_swiftpm (args , integrated_swift_driver ):
512
525
"""Builds SwiftPM using the version of SwiftPM built with CMake."""
513
526
note ("Building SwiftPM (with swift-build)" )
514
527
515
- call_swiftpm ( args , [
528
+ swiftpm_args = [
516
529
"SWIFT_EXEC=" + args .swiftc_path ,
517
530
"SWIFTPM_PD_LIBS=" + os .path .join (args .bootstrap_dir , "pm" ),
518
531
os .path .join (args .bootstrap_dir , "bin/swift-build" ),
519
532
"--disable-sandbox" ,
520
- ])
533
+ ]
534
+ if integrated_swift_driver :
535
+ swiftpm_args .append ("--use-integrated-swift-driver" )
536
+
537
+ call_swiftpm (args , swiftpm_args )
521
538
522
539
# Setup symlinks that'll allow using swiftpm from the build directory.
523
540
symlink_force (args .swiftc_path , os .path .join (args .target_dir , args .conf , "swiftc" ))
0 commit comments