Skip to content

Commit de82e31

Browse files
authored
Merge pull request #83755 from MaxDesiatov/wasmkit-cmake
Currently, passing `--wasmkit` to `build-script` also requires `--swiftpm --install-swiftpm` and all of their dependencies (at the very least Dispatch, Foundation, XCTest, Testing, llbuild, swift-build). We can conditionally switch to host SwiftPM when new SwiftPM is not built or installed.
2 parents 89b43dc + 35823ec commit de82e31

File tree

1 file changed

+8
-5
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+8
-5
lines changed

utils/swift_build_support/swift_build_support/products/wasmkit.py

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

7474

7575
def run_swift_build(host_target, product, swiftpm_package_product_name, set_installation_rpath=False):
76-
if product.args.build_runtime_with_host_compiler:
77-
swift_build = product.toolchain.swift_build
78-
else:
79-
# Building with the freshly-built SwiftPM
80-
swift_build = os.path.join(product.install_toolchain_path(host_target), "bin", "swift-build")
76+
swift_build = os.path.join(product.install_toolchain_path(host_target), "bin", "swift-build")
77+
78+
if not os.path.exists(swift_build) or product.args.build_runtime_with_host_compiler:
79+
print(
80+
f"WARNING: build-script's {os.path.basename(__file__)} is running local development code path, "
81+
"don't use these build artifacts for deployment!"
82+
)
83+
swift_build = product.toolchain.swift_build
8184

8285
if host_target.startswith('macos'):
8386
# Universal binary on macOS

0 commit comments

Comments
 (0)