Reapply "Fix mozjs build on Windows (#34680)" (#34693)

This reverts commit bc0c8366f8,
relanding commit 11424f90b3.

Reason: it wasn't the cause behind #34688.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Oriol Brufau 2024-12-18 21:01:12 -08:00 committed by GitHub
parent e2a0ac07ff
commit fcf996196b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -832,6 +832,10 @@ class CommandBase(object):
if with_debug_assertions or self.config["build"]["debug-assertions"]:
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
# mozjs gets its Python from `env['PYTHON3']`, which defaults to `python3`,
# but uv venv on Windows only provides a `python`, not `python3`.
env['PYTHON3'] = "python"
return call(["cargo", command] + args + cargo_args, env=env, verbose=verbose)
def android_adb_path(self, env):