diff --git a/recipes/recipes_emscripten/xeus-ocaml/build.sh b/recipes/recipes_emscripten/xeus-ocaml/build.sh index 906d3286342..5f3ef2e389f 100644 --- a/recipes/recipes_emscripten/xeus-ocaml/build.sh +++ b/recipes/recipes_emscripten/xeus-ocaml/build.sh @@ -6,10 +6,13 @@ set -ex # Use a subshell to isolate the environment changes # ========================================================================= ( - unset CC CXX CFLAGS CXXFLAGS LDFLAGS + # --- Disable OCaml-related wasm flags: OCaml needs native builders --- + unset CC CXX CFLAGS CXXFLAGS LDFLAGS OPAMSWITCH + # --- Private opam root built into the source tree (no cross-build caching) --- + export OPAMROOT=$SRC_DIR/opam_root cd ocaml - opam init --disable-sandboxing --no --compiler=5.4.0 + opam init --disable-sandboxing --no --compiler=5.5.0 opam install dune opam exec -- dune pkg lock opam exec -- dune build --profile release @@ -26,6 +29,11 @@ cp -r ocaml/_build/default/src/* ocaml-build/ mkdir -p build cd build +# Clear the host (native) LDFLAGS: CMake reads LDFLAGS into the linker flags, +# and the native `-Wl,--no-pie/--sort-common/--as-needed` flags are rejected +# by wasm-ld. +unset LDFLAGS + cmake -S ${SRC_DIR} -GNinja ${CMAKE_ARGS} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=${PREFIX} \ diff --git a/recipes/recipes_emscripten/xeus-ocaml/recipe.yaml b/recipes/recipes_emscripten/xeus-ocaml/recipe.yaml index 8a81e20910f..eb65dcd9bad 100644 --- a/recipes/recipes_emscripten/xeus-ocaml/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-ocaml/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.2.8 + version: 0.2.10 package: name: xeus-ocaml @@ -7,7 +7,7 @@ package: source: url: https://github.com/davy39/xeus-ocaml/archive/refs/tags/v${{ version }}.tar.gz - sha256: 4e9390b103ef41ccbedb2c313e6e08094aaceae56e517952895841e4acfffa44 + sha256: 6ea09c94538b2a13fce17e4c3257e5937cea799888da4fc4f1b309e6c9f98a3b requirements: build: