diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 31174ca2..958a1b41 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -165,6 +165,7 @@ jobs: pushd build export CMAKE_PREFIX_PATH=${{ env.PREFIX }} export CMAKE_SYSTEM_PREFIX_PATH=${{ env.PREFIX }} + export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot emcmake cmake \ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DCMAKE_PREFIX_PATH=${{ env.PREFIX }} \ @@ -172,6 +173,7 @@ jobs: -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \ -DCppInterOp_DIR="${{ env.CPPINTEROP_BUILD_DIR }}/lib/cmake/CppInterOp" \ + -DSYSROOT_PATH=$SYSROOT_PATH \ .. emmake make -j ${{ env.ncpus }} install @@ -183,6 +185,8 @@ jobs: micromamba activate xeus-lite-host python -m pip install jupyterlite-xeus jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} --output-dir dist + cp xcpp.data dist/extensions/@jupyterlite/xeus/static + cp $PREFIX/lib/libclangCppInterOp.so dist/extensions/@jupyterlite/xeus/static - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index ae7e3ab4..5b0ebf16 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -605,6 +605,7 @@ jobs: pushd build export CMAKE_PREFIX_PATH=${{ env.PREFIX }} export CMAKE_SYSTEM_PREFIX_PATH=${{ env.PREFIX }} + export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot emcmake cmake \ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DCMAKE_PREFIX_PATH=${{ env.PREFIX }} \ @@ -612,5 +613,6 @@ jobs: -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \ -DCppInterOp_DIR="${{ env.CPPINTEROP_BUILD_DIR }}/lib/cmake/CppInterOp" \ + -DSYSROOT_PATH=$SYSROOT_PATH \ .. emmake make -j ${{ env.ncpus }} diff --git a/patches/llvm/emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch b/patches/llvm/emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch new file mode 100644 index 00000000..32ac45c1 --- /dev/null +++ b/patches/llvm/emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch @@ -0,0 +1,15 @@ +diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp +index aa10b160ccf8..184867e2b55f 100644 +--- a/clang/lib/Interpreter/Wasm.cpp ++++ b/clang/lib/Interpreter/Wasm.cpp +@@ -76,8 +76,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { + llvm::TargetMachine *TargetMachine = Target->createTargetMachine( + PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_); + PTU.TheModule->setDataLayout(TargetMachine->createDataLayout()); +- std::string ObjectFileName = PTU.TheModule->getName().str() + ".o"; +- std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm"; ++ std::string ObjectFileName = "/tmp/" + PTU.TheModule->getName().str() + ".o"; ++ std::string BinaryFileName = "/tmp/" + PTU.TheModule->getName().str() + ".wasm"; + + std::error_code Error; + llvm::raw_fd_ostream ObjectFileOutput(llvm::StringRef(ObjectFileName), Error);