From b6b36326471aaaee5bcf5d4c394680dfb091ad81 Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Tue, 14 Nov 2023 12:50:39 -0800 Subject: [PATCH 1/3] Make `skip-cmake-bootstrap` unconditional Follow up to #7089 I don't necessarily expect this to work as-is. --- Utilities/bootstrap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index 55bdd1606c9..bdfa8483ca7 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -238,8 +238,7 @@ def parse_build_args(args): args.bootstrap_dir = os.path.join(args.target_dir, "bootstrap") args.conf = 'release' if args.release else 'debug' args.bin_dir = os.path.join(args.target_dir, args.conf) - args.bootstrap = not args.skip_cmake_bootstrap or \ - not os.path.exists(os.path.join(os.path.split(args.swiftc_path)[0], "swift-build")) + args.bootstrap = not args.skip_cmake_bootstrap def parse_test_args(args): """Parses and cleans arguments necessary for the test action.""" @@ -635,7 +634,11 @@ def build_swiftpm_with_swiftpm(args, integrated_swift_driver): swiftpm_args.append(os.path.join(args.bootstrap_dir, "bin/swift-bootstrap")) else: note("Building SwiftPM (with a prebuilt swift-build)") - swiftpm_args.append(os.path.join(os.path.split(args.swiftc_path)[0], "swift-build")) + toolchain_swift_build_path = os.path.join(os.path.split(args.swiftc_path)[0], "swift-build") + if os.path.exists(toolchain_swift_build_path): + swiftpm_args.append(toolchain_swift_build_path) + else: + swiftpm_args += ["swift", "build"] swiftpm_args.append("--disable-sandbox") # Enforce resolved versions to avoid stray dependencies that aren't local. From b1e77c8f1213e22542f22e9bb7c221c16cc750d4 Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Tue, 14 Nov 2023 16:11:51 -0800 Subject: [PATCH 2/3] print --- Utilities/bootstrap | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index bdfa8483ca7..d51d114e9ac 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -692,6 +692,7 @@ def call_swiftpm(args, cmd, cwd=None): full_cmd = get_swiftpm_env_cmd(args) + cmd + get_swiftpm_flags(args) if cwd is None: cwd = args.project_root + print(full_cmd) call(full_cmd, cwd=cwd, verbose=True) # ----------------------------------------------------------- From 6982032e6d81a4d35fab886f5025b72dc605bfba Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Tue, 14 Nov 2023 17:19:53 -0800 Subject: [PATCH 3/3] lunch --- Utilities/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index d51d114e9ac..ade8d12595f 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -814,7 +814,7 @@ def get_swiftpm_flags(args): # Ensure we are not sharing the module cache with concurrent builds in CI local_module_cache_path=os.path.join(args.build_dir, "module-cache") - for modifier in ["-Xswiftc", "-Xbuild-tools-swiftc"]: + for modifier in ["-Xswiftc"]: build_flags.extend([modifier, "-module-cache-path", modifier, local_module_cache_path]) # Disabled, enable this again when it works