Enable Emscripten threading for MuJoCo WASM builds.

PiperOrigin-RevId: 863309872
Change-Id: I2edabb386f3abc74e507d0419b136b1586d01241
This commit is contained in:
Google DeepMind
2026-01-30 10:57:12 -08:00
committed by Copybara-Service
parent b073cd2ca4
commit 7418d86eda
6 changed files with 80 additions and 9 deletions
+2
View File
@@ -52,6 +52,8 @@ endif()
if(EMSCRIPTEN)
option(MUJOCO_BUILD_TESTS_WASM "Build tests for WASM bindings" ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -O3 -pthread -fexceptions")
endif()
if(APPLE AND (MUJOCO_BUILD_EXAMPLES OR MUJOCO_BUILD_SIMULATE))