Skip to content

Commit a073e66

Browse files
authored
Merge pull request #82839 from MaxDesiatov/maxd/wasmkit-with-host-tools
For small local incremental builds that require WasmKit it's faster to build WasmKit with the host toolchain instead of waiting for a full bootstrap build to complete.
2 parents 785e7b1 + 4a8871f commit a073e66

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

utils/swift_build_support/swift_build_support/products/wasmkit.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ def cli_file_path(cls, build_dir):
7474

7575

7676
def run_swift_build(host_target, product, swiftpm_package_product_name, set_installation_rpath=False):
77-
# Building with the freshly-built SwiftPM
78-
swift_build = os.path.join(product.install_toolchain_path(host_target), "bin", "swift-build")
77+
if product.args.build_runtime_with_host_compiler:
78+
swift_build = product.toolchain.swift_build
79+
else:
80+
# Building with the freshly-built SwiftPM
81+
swift_build = os.path.join(product.install_toolchain_path(host_target), "bin", "swift-build")
7982

8083
if host_target.startswith('macos'):
8184
# Universal binary on macOS

utils/swift_build_support/swift_build_support/toolchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def _getter(self):
7070
_register("ar", "ar")
7171
_register("sccache", "sccache")
7272
_register("swiftc", "swiftc")
73+
_register("swift_build", "swift-build")
7374

7475

7576
class Darwin(Toolchain):

0 commit comments

Comments
 (0)