diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index bcb076a2b..95e37c1c0 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.18" steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 40b4ab9bd..d87cb6c6d 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.18" - 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.18" - 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.18" - 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.18" 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.18" - 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.18" - 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.18" - 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.18" steps: - uses: actions/checkout@v5 @@ -479,8 +479,10 @@ jobs: -DSYSROOT_PATH=$SYSROOT_PATH \ ../ fi - + set +e emmake make -j ${{ env.ncpus }} check-cppinterop + cat /home/runner/work/CppInterOp/CppInterOp/build/unittests/googletest-prefix/src/googletest-stamp/googletest-build-*.log + set -e os="${{ matrix.os }}" if [[ "${os}" != macos* ]] ; then actual_size=$(stat -c%s "./lib/libclangCppInterOp.so") diff --git a/Emscripten-build-instructions.md b/Emscripten-build-instructions.md index 467b4a716..61114db1a 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.18) ```bash git clone https://github.com/emscripten-core/emsdk.git -./emsdk/emsdk install 3.1.73 +./emsdk/emsdk install 4.0.18 ``` 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.18 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.18 .\emsdk\emsdk_env.ps1 $env:PWD_DIR= $PWD.Path $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot" diff --git a/docs/Emscripten-build-instructions.rst b/docs/Emscripten-build-instructions.rst index 5bb69fdd1..ac39f8e6d 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.18) .. code:: bash git clone https://github.com/emscripten-core/emsdk.git - ./emsdk/emsdk install 3.1.73 + ./emsdk/emsdk install 4.0.18 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.18 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.18 .\emsdk\emsdk_env.ps1 $env:PWD_DIR= $PWD.Path $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot" @@ -429,4 +429,4 @@ and on Windows execute --contents xeus-cpp/notebooks/images/marie.png ` --contents xeus-cpp/notebooks/audio/audio.wav ` --XeusAddon.mounts="$env:PREFIX/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" ` - --XeusAddon.mounts="$env:PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \ No newline at end of file + --XeusAddon.mounts="$env:PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" diff --git a/environment-wasm.yml b/environment-wasm.yml index 69ada0756..d4681f000 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.18 - nlohmann_json - nlohmann_json-abi - xeus-lite diff --git a/unittests/CppInterOp/FunctionReflectionTest.cpp b/unittests/CppInterOp/FunctionReflectionTest.cpp index 96dd45477..84df66fd5 100644 --- a/unittests/CppInterOp/FunctionReflectionTest.cpp +++ b/unittests/CppInterOp/FunctionReflectionTest.cpp @@ -1455,7 +1455,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 14ed2619d..528fd5880 100644 --- a/unittests/CppInterOp/InterpreterTest.cpp +++ b/unittests/CppInterOp/InterpreterTest.cpp @@ -142,7 +142,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); diff --git a/unittests/CppInterOp/ScopeReflectionTest.cpp b/unittests/CppInterOp/ScopeReflectionTest.cpp index 62a472554..c797840a5 100644 --- a/unittests/CppInterOp/ScopeReflectionTest.cpp +++ b/unittests/CppInterOp/ScopeReflectionTest.cpp @@ -220,7 +220,7 @@ TYPED_TEST(CppInterOpTest, ScopeReflectionTestIsBuiltin) { // "int", "unsigned int", "long", "unsigned long", "long long", "unsigned long long", // "float", "double", "long double", "void"} - std::vector interpreter_args = { "-include", "new" }; + std::vector interpreter_args = { "-include", "new", "-Xclang", "-iwithsysroot/include/compat" }; TestFixture::CreateInterpreter(interpreter_args); ASTContext &C = Interp->getCI()->getASTContext();