Skip to content

Commit

Permalink
Don't accidentally delete the checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed Nov 22, 2023
1 parent 2a6c541 commit c7dcc95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tools/wasm/wasi.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def build_platform():
return sysconfig.get_config_var("BUILD_GNU_TYPE")


@subdir(CHECKOUT)
def prep_checkout(context, working_dir):
# Don't use subdir(); it will delete the checkout!
def prep_checkout(context):
"""Prepare the source checkout for cross-compiling."""
# Without `Setup.local`, in-place execution fails to realize it's in a
# build tree/checkout (the dreaded "No module named 'encodings'" error).
local_setup = working_dir / "Modules" / "Setup.local"
local_setup = CHECKOUT / "Modules" / "Setup.local"
if local_setup.exists():
print("Modules/Setup.local already exists ...")
else:
Expand Down

0 comments on commit c7dcc95

Please sign in to comment.