Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bazel/emscripten_toolchain/env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ set ROOT_DIR=%EXT_BUILD_ROOT%
if "%ROOT_DIR%"=="" set ROOT_DIR=%CD%
set EMSCRIPTEN=%ROOT_DIR%\%EM_BIN_PATH%\emscripten
set EM_CONFIG=%ROOT_DIR%\%EM_CONFIG_PATH%

:: If EMSDK_PYTHON is a relative path, make it absolute using ROOT_DIR.
:: This is needed because emscripten system library generation invokes compilers
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library generation should always be disabled in Bazel, as it is not hermetic and won't work with remote builds.

:: from subdirectories inside its cache, where relative paths to python break.
if not "%EMSDK_PYTHON%"=="" ^
if not "%EMSDK_PYTHON:~1,1%"==":" ^
if not "%EMSDK_PYTHON:~0,1%"=="\" ^
set "EMSDK_PYTHON=%ROOT_DIR%\%EMSDK_PYTHON%"