diff --git a/bazel/emscripten_toolchain/env.bat b/bazel/emscripten_toolchain/env.bat index 644519ebf0..7c3f3e29cc 100644 --- a/bazel/emscripten_toolchain/env.bat +++ b/bazel/emscripten_toolchain/env.bat @@ -3,3 +3,7 @@ set ROOT_DIR=%CD% set EMSCRIPTEN=%ROOT_DIR%\%EM_BIN_PATH%\emscripten set EM_CONFIG=%ROOT_DIR%\%EM_CONFIG_PATH% + +:: Ensure PYTHONSAFEPATH is not set so that modules in the same +:: directory as emcc.py and emar.py etc. can be found via sys.path +set PYTHONSAFEPATH= diff --git a/bazel/emscripten_toolchain/env.sh b/bazel/emscripten_toolchain/env.sh index b2a6bd60b0..44bf6f6b60 100755 --- a/bazel/emscripten_toolchain/env.sh +++ b/bazel/emscripten_toolchain/env.sh @@ -3,3 +3,7 @@ export ROOT_DIR=${EXT_BUILD_ROOT:-$(pwd -P)} export EMSCRIPTEN=$ROOT_DIR/$EM_BIN_PATH/emscripten export EM_CONFIG=$ROOT_DIR/$EM_CONFIG_PATH + +# Ensure PYTHONSAFEPATH is not set so that modules in the same +# directory as emcc.py and emar.py etc. can be found via sys.path +unset PYTHONSAFEPATH