From 288edfd6d09df103efacb355ab7ea4e57db708a7 Mon Sep 17 00:00:00 2001 From: David Hart Date: Thu, 5 Dec 2019 13:42:37 +0100 Subject: [PATCH] =?UTF-8?q?Migration=20to=20SwiftpM=E2=80=99s=20new=20boos?= =?UTF-8?q?trap=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../swift_build_support/products/swiftpm.py | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/utils/swift_build_support/swift_build_support/products/swiftpm.py b/utils/swift_build_support/swift_build_support/products/swiftpm.py index 0bf7997b5387b..475483618f126 100644 --- a/utils/swift_build_support/swift_build_support/products/swiftpm.py +++ b/utils/swift_build_support/swift_build_support/products/swiftpm.py @@ -30,12 +30,9 @@ def should_build(self, host_target): def run_bootstrap_script(self, action, host_target, additional_params=[]): script_path = os.path.join( - self.source_dir, 'Utilities', 'bootstrap') + self.source_dir, 'Utilities', 'new-bootstrap') toolchain_path = self.install_toolchain_path() swiftc = os.path.join(toolchain_path, "usr", "bin", "swiftc") - sbt = os.path.join(toolchain_path, "usr", "bin", "swift-build-tool") - - llbuild_src = os.path.join(os.path.dirname(self.source_dir), "llbuild") # FIXME: We require llbuild build directory in order to build. Is # there a better way to get this? @@ -43,20 +40,18 @@ def run_bootstrap_script(self, action, host_target, additional_params=[]): llbuild_build_dir = os.path.join( build_root, '%s-%s' % ("llbuild", host_target)) - helper_cmd = [script_path] - - if action != "build": - helper_cmd.append(action) + helper_cmd = [script_path, action] if self.is_release(): helper_cmd.append("--release") helper_cmd += [ - "--swiftc", swiftc, - "--sbt", sbt, - "--build", self.build_dir, - "--llbuild-source-dir", llbuild_src, - "--llbuild-build-dir", llbuild_build_dir, + "--swiftc-path", swiftc, + "--clang-path", self.toolchain.cc, + "--cmake-path", self.toolchain.cmake, + "--ninja-path", self.toolchain.ninja, + "--build-dir", self.build_dir, + "--llbuild-build-dir", llbuild_build_dir ] helper_cmd.extend(additional_params)