summaryrefslogtreecommitdiffstats
path: root/Tools/wasm
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-08-15 05:41:10 (GMT)
committerGitHub <noreply@github.com>2022-08-15 05:41:10 (GMT)
commit4a7f5a55dc88c14cef880ae38a96018514ca9d83 (patch)
tree5c93774d5687c3c480006803e6accc72b5516812 /Tools/wasm
parente8259e047c42976427b08f100b9d8ba52db7ee69 (diff)
downloadcpython-4a7f5a55dc88c14cef880ae38a96018514ca9d83.zip
cpython-4a7f5a55dc88c14cef880ae38a96018514ca9d83.tar.gz
cpython-4a7f5a55dc88c14cef880ae38a96018514ca9d83.tar.bz2
gh-95853: Address wasm build and test issues (GH-95985)
Diffstat (limited to 'Tools/wasm')
-rwxr-xr-xTools/wasm/wasm_build.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/Tools/wasm/wasm_build.py b/Tools/wasm/wasm_build.py
index e7a1f4a..df90f01 100755
--- a/Tools/wasm/wasm_build.py
+++ b/Tools/wasm/wasm_build.py
@@ -191,7 +191,11 @@ EMSCRIPTEN = Platform(
config_site=WASMTOOLS / "config.site-wasm32-emscripten",
configure_wrapper=EMSCRIPTEN_ROOT / "emconfigure",
make_wrapper=EMSCRIPTEN_ROOT / "emmake",
- environ={"EM_COMPILER_WRAPPER": "ccache"} if HAS_CCACHE else {},
+ environ={
+ # workaround for https://github.com/emscripten-core/emscripten/issues/17635
+ "TZ": "UTC",
+ "EM_COMPILER_WRAPPER": "ccache" if HAS_CCACHE else None,
+ },
check=_check_emscripten,
)
@@ -352,12 +356,15 @@ class BuildProfile:
env.setdefault("MAKEFLAGS", f"-j{os.cpu_count()}")
platenv = self.host.platform.getenv(self)
for key, value in platenv.items():
- if isinstance(value, str):
- value = value.format(
+ if value is None:
+ env.pop(key, None)
+ elif isinstance(value, str):
+ env[key] = value.format(
relbuilddir=self.builddir.relative_to(SRCDIR),
srcdir=SRCDIR,
)
- env[key] = value
+ else:
+ env[key] = value
return env
def _run_cmd(self, cmd: Iterable[str], args: Iterable[str]):