diff --git a/utils/swift_build_support/swift_build_support/products/wasmkit.py b/utils/swift_build_support/swift_build_support/products/wasmkit.py index 8756b8930377e..40edea918e5f3 100644 --- a/utils/swift_build_support/swift_build_support/products/wasmkit.py +++ b/utils/swift_build_support/swift_build_support/products/wasmkit.py @@ -73,11 +73,14 @@ def cli_file_path(cls, build_dir): def run_swift_build(host_target, product, swiftpm_package_product_name, set_installation_rpath=False): - if product.args.build_runtime_with_host_compiler: - swift_build = product.toolchain.swift_build - else: - # Building with the freshly-built SwiftPM - swift_build = os.path.join(product.install_toolchain_path(host_target), "bin", "swift-build") + swift_build = os.path.join(product.install_toolchain_path(host_target), "bin", "swift-build") + + if not os.path.exists(swift_build) or product.args.build_runtime_with_host_compiler: + print( + f"WARNING: build-script's {os.path.basename(__file__)} is running local development code path, " + "don't use these build artifacts for deployment!" + ) + swift_build = product.toolchain.swift_build if host_target.startswith('macos'): # Universal binary on macOS