@@ -534,6 +534,8 @@ def main():
534
534
help = "Path to Foundation build directory" )
535
535
parser .add_argument ("--xctest" , dest = "xctest_path" ,
536
536
help = "Path to XCTest build directory" )
537
+ parser .add_argument ("--release" , action = "store_true" ,
538
+ help = "Build stage 2 for release" )
537
539
args = parser .parse_args ()
538
540
539
541
if not args .swiftc_path :
@@ -638,6 +640,9 @@ def main():
638
640
cmd .extend (["-Xswiftc" , "-I{}" .format (args .foundation_path )])
639
641
cmd .extend (["-Xswiftc" , "-I{}" .format (core_foundation_path )])
640
642
643
+ if args .release :
644
+ cmd .extend (["--configuration" , "release" ])
645
+
641
646
cmd = env_cmd + cmd
642
647
643
648
note ("building self-hosted 'swift-build': %s" % (
@@ -648,7 +653,6 @@ def main():
648
653
649
654
swift_build_path = os .path .join (build_path , "debug" , "swift-build" )
650
655
swift_test_path = os .path .join (build_path , "debug" , "swift-test" )
651
- note ("built: %s" % (swift_build_path ,))
652
656
653
657
# If testing, run each of the test bundles.
654
658
if "test" in build_actions :
0 commit comments