diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 068e88780..47a662030 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -26,7 +26,7 @@ jobs: clang-runtime: '20' cling: Off micromamba_shell_init: bash - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index b5f378d2a..b5293a8e9 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -27,28 +27,28 @@ jobs: cling: Off llvm_enable_projects: "clang;lld" llvm_targets_to_build: "WebAssembly" - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" - name: osx15-arm-clang-repl-20-emscripten os: macos-15 clang-runtime: '20' cling: Off llvm_enable_projects: "clang;lld" llvm_targets_to_build: "WebAssembly" - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" - name: ubu24-x86-clang-repl-20-emscripten os: ubuntu-24.04 clang-runtime: '20' cling: Off llvm_enable_projects: "clang;lld" llvm_targets_to_build: "WebAssembly" - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" - name: win2025-x86-clang-repl-20-emscripten os: windows-2025 clang-runtime: '20' cling: Off llvm_enable_projects: "clang;lld" llvm_targets_to_build: "WebAssembly" - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" steps: - uses: actions/checkout@v5 @@ -366,25 +366,25 @@ jobs: clang-runtime: '20' cling: Off micromamba_shell_init: bash - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" - name: osx15-arm-clang-repl-20-emscripten_wasm os: macos-15 clang-runtime: '20' cling: Off micromamba_shell_init: bash - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" - name: ubu24-arm-clang-repl-20-emscripten_wasm os: ubuntu-24.04-arm clang-runtime: '20' cling: Off micromamba_shell_init: bash - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" - name: win2025-x86-clang-repl-20-emscripten os: windows-2025 clang-runtime: '20' cling: Off micromamba_shell_init: powershell - emsdk_ver: "3.1.73" + emsdk_ver: "4.0.9" steps: - uses: actions/checkout@v5 @@ -479,7 +479,6 @@ jobs: -DSYSROOT_PATH=$SYSROOT_PATH \ ../ fi - emmake make -j ${{ env.ncpus }} check-cppinterop os="${{ matrix.os }}" if [[ "${os}" != macos* ]] ; then diff --git a/Emscripten-build-instructions.md b/Emscripten-build-instructions.md index 7e9f516e1..c88391745 100644 --- a/Emscripten-build-instructions.md +++ b/Emscripten-build-instructions.md @@ -19,16 +19,16 @@ cd ./CppInterOp-wasm ``` To create a wasm build of CppInterOp we make use of the emsdk toolchain. This can be installed by executing (we only currently -support version 3.1.73) +support version 4.0.9) ```bash git clone https://github.com/emscripten-core/emsdk.git -./emsdk/emsdk install 3.1.73 +./emsdk/emsdk install 4.0.9 ``` and to activate the emsdk environment on Linux and osx execute (we are defining SYSROOT_PATH for use later) ```bash -./emsdk/emsdk activate 3.1.73 +./emsdk/emsdk activate 4.0.9 source ./emsdk/emsdk_env.sh export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot ``` @@ -36,7 +36,7 @@ export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot and on Windows execute in Powershell ```powershell -.\emsdk\emsdk activate 3.1.73 +.\emsdk\emsdk activate 4.0.9 .\emsdk\emsdk_env.ps1 $env:PWD_DIR= $PWD.Path $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot" diff --git a/cmake/modules/GoogleTest.cmake b/cmake/modules/GoogleTest.cmake index e6753c30c..c9f6dba6b 100644 --- a/cmake/modules/GoogleTest.cmake +++ b/cmake/modules/GoogleTest.cmake @@ -34,8 +34,8 @@ endif() ExternalProject_Add( googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_SHALLOW 1 - GIT_TAG v1.17.0 + GIT_SHALLOW FALSE + GIT_TAG fa8438ae6b70c57010177de47a9f13d7041a6328 UPDATE_COMMAND "" # # Force separate output paths for debug and release builds to allow easy # # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands diff --git a/docs/Emscripten-build-instructions.rst b/docs/Emscripten-build-instructions.rst index c36f5e0bb..6b1778125 100644 --- a/docs/Emscripten-build-instructions.rst +++ b/docs/Emscripten-build-instructions.rst @@ -32,19 +32,19 @@ Now move into this directory using the following command To create a wasm build of CppInterOp we make use of the emsdk toolchain. This can be installed by executing (we only currently support version -3.1.73) +4.0.9) .. code:: bash git clone https://github.com/emscripten-core/emsdk.git - ./emsdk/emsdk install 3.1.73 + ./emsdk/emsdk install 4.0.9 and to activate the emsdk environment on Linux and osx execute (we are defining SYSROOT_PATH for use later) .. code:: bash - ./emsdk/emsdk activate 3.1.73 + ./emsdk/emsdk activate 4.0.9 source ./emsdk/emsdk_env.sh export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot @@ -52,7 +52,7 @@ and on Windows execute in Powershell .. code:: powershell - .\emsdk\emsdk activate 3.1.73 + .\emsdk\emsdk activate 4.0.9 .\emsdk\emsdk_env.ps1 $env:PWD_DIR= $PWD.Path $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot" diff --git a/environment-wasm.yml b/environment-wasm.yml index 69ada0756..c09a87636 100644 --- a/environment-wasm.yml +++ b/environment-wasm.yml @@ -1,9 +1,9 @@ name: CppInterOp-wasm channels: - - https://prefix.dev/emscripten-forge-dev + - https://prefix.dev/emscripten-forge-4x - https://prefix.dev/conda-forge dependencies: - - emscripten-abi==3.1.73 + - emscripten-abi==4.0.9 - nlohmann_json - nlohmann_json-abi - xeus-lite diff --git a/unittests/CppInterOp/FunctionReflectionTest.cpp b/unittests/CppInterOp/FunctionReflectionTest.cpp index d020ace9f..6e863a793 100644 --- a/unittests/CppInterOp/FunctionReflectionTest.cpp +++ b/unittests/CppInterOp/FunctionReflectionTest.cpp @@ -1547,7 +1547,7 @@ TYPED_TEST(CppInterOpTest, FunctionReflectionTestGetFunctionAddress) { std::vector Decls; std::string code = "int f1(int i) { return i * i; }"; - std::vector interpreter_args = {"-include", "new"}; + std::vector interpreter_args = {"-include", "new", "-Xclang", "-iwithsysroot/include/compat"}; GetAllTopLevelDecls(code, Decls, /*filter_implicitGenerated=*/false, interpreter_args); diff --git a/unittests/CppInterOp/InterpreterTest.cpp b/unittests/CppInterOp/InterpreterTest.cpp index 6e5446cfd..59047854e 100644 --- a/unittests/CppInterOp/InterpreterTest.cpp +++ b/unittests/CppInterOp/InterpreterTest.cpp @@ -156,7 +156,7 @@ TYPED_TEST(CppInterOpTest, InterpreterTestProcess) { GTEST_SKIP() << "Test fails for OOP JIT builds"; if (llvm::sys::RunningOnValgrind()) GTEST_SKIP() << "XFAIL due to Valgrind report"; - std::vector interpreter_args = { "-include", "new" }; + std::vector interpreter_args = { "-include", "new", "-Xclang", "-iwithsysroot/include/compat" }; auto* I = TestFixture::CreateInterpreter(interpreter_args); EXPECT_TRUE(Cpp::Process("") == 0); EXPECT_TRUE(Cpp::Process("int a = 12;") == 0);