|
22 | 22 | CROSS_BUILD_DIR = CHECKOUT / "cross-build" |
23 | 23 | BUILD_DIR = CROSS_BUILD_DIR / "build" |
24 | 24 |
|
25 | | -LOCAL_SETUP = CHECKOUT / "Modules" / "Setup.local" |
26 | | -LOCAL_SETUP_MARKER = "# Generated by Tools/wasm/wasi.py\n".encode("utf-8") |
27 | | - |
28 | 25 | WASMTIME_VAR_NAME = "WASMTIME" |
29 | 26 | WASMTIME_HOST_RUNNER_VAR = f"{{{WASMTIME_VAR_NAME}}}" |
30 | 27 |
|
@@ -140,12 +137,6 @@ def build_python_is_pydebug(): |
140 | 137 | @subdir(BUILD_DIR, clean_ok=True) |
141 | 138 | def configure_build_python(context, working_dir): |
142 | 139 | """Configure the build/host Python.""" |
143 | | - if LOCAL_SETUP.exists(): |
144 | | - print(f"👍 {LOCAL_SETUP} exists ...") |
145 | | - else: |
146 | | - print(f"📝 Touching {LOCAL_SETUP} ...") |
147 | | - LOCAL_SETUP.write_bytes(LOCAL_SETUP_MARKER) |
148 | | - |
149 | 140 | configure = [os.path.relpath(CHECKOUT / 'configure', working_dir)] |
150 | 141 | if context.args: |
151 | 142 | configure.extend(context.args) |
@@ -215,6 +206,10 @@ def configure_wasi_python(context, working_dir): |
215 | 206 | "https://github.com/WebAssembly/wasi-sdk and/or " |
216 | 207 | "specify via $WASI_SDK_PATH or --wasi-sdk") |
217 | 208 |
|
| 209 | + setup_local = CHECKOUT / "Modules" / "Setup.local" |
| 210 | + if setup_local.exists(): |
| 211 | + print(f"⚠️ {setup_local.relative_to(CHECKOUT)} exists") |
| 212 | + |
218 | 213 | config_site = os.fsdecode(CHECKOUT / "Tools" / "wasm" / "wasi" / "config.site-wasm32-wasi") |
219 | 214 |
|
220 | 215 | wasi_build_dir = working_dir.relative_to(CHECKOUT) |
@@ -296,11 +291,6 @@ def clean_contents(context): |
296 | 291 | print(f"🧹 Deleting {CROSS_BUILD_DIR} ...") |
297 | 292 | shutil.rmtree(CROSS_BUILD_DIR) |
298 | 293 |
|
299 | | - if LOCAL_SETUP.exists(): |
300 | | - with LOCAL_SETUP.open("rb") as file: |
301 | | - if file.read(len(LOCAL_SETUP_MARKER)) == LOCAL_SETUP_MARKER: |
302 | | - print(f"🧹 Deleting generated {LOCAL_SETUP} ...") |
303 | | - |
304 | 294 |
|
305 | 295 | def main(): |
306 | 296 | default_host_runner = (f"{WASMTIME_HOST_RUNNER_VAR} run " |
|
0 commit comments