diff --git a/.github/scripts/args-debug.gn b/.github/scripts/args-debug.gn index f0acb13..a1edf75 100644 --- a/.github/scripts/args-debug.gn +++ b/.github/scripts/args-debug.gn @@ -23,4 +23,4 @@ v8_third_party_heap_files = [ "$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.h", "$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.cc" ] -v8_third_party_heap_libs = [ "$the_root/mmtk/target/debug/libmmtk_v8.so" ] +v8_third_party_heap_libs = [ "$the_root/mmtk/target/x86_64-unknown-linux-gnu/debug/libmmtk_v8.so" ] diff --git a/.github/scripts/args-optdebug.gn b/.github/scripts/args-optdebug.gn index ec9bd6a..9add4de 100644 --- a/.github/scripts/args-optdebug.gn +++ b/.github/scripts/args-optdebug.gn @@ -22,4 +22,4 @@ v8_third_party_heap_files = [ "$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.h", "$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.cc" ] -v8_third_party_heap_libs = [ "$the_root/mmtk/target/debug/libmmtk_v8.so" ] +v8_third_party_heap_libs = [ "$the_root/mmtk/target/x86_64-unknown-linux-gnu/debug/libmmtk_v8.so" ] diff --git a/.github/scripts/build-mmtk.sh b/.github/scripts/build-mmtk.sh index 6471fa5..405b677 100755 --- a/.github/scripts/build-mmtk.sh +++ b/.github/scripts/build-mmtk.sh @@ -2,6 +2,15 @@ set -xe . $(dirname "$0")/common.sh +export PATH=~/.cargo/bin:$PATH +# Check if we have cross available +if ! [ -x "$(command -v cross)" ]; then + echo 'Cross is not available. Will install cross.' >&2 + # lock to version 0.2.4. This version uses libc 2.31 for x86_64. + # This matches the version in the sysroot used by V8 (debian bullseye) + cargo install cross@0.2.4 --git https://github.com/cross-rs/cross +fi + # simply build mmtk-v8 with nogc cd $THE_ROOT/mmtk -rustup run $RUSTUP_TOOLCHAIN cargo build --features nogc +cross build --target x86_64-unknown-linux-gnu --features nogc diff --git a/.github/scripts/common.sh b/.github/scripts/common.sh index cf58cc2..3cb12ce 100644 --- a/.github/scripts/common.sh +++ b/.github/scripts/common.sh @@ -5,8 +5,8 @@ export THE_ROOT=`realpath $(dirname "$0")/../..` export V8_ROOT=$THE_ROOT/deps # Test with a specific revision. -export V8_VERSION=`cargo read-manifest --manifest-path=$THE_ROOT/mmtk/Cargo.toml | python -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["v8"]["v8_version"])'` +export V8_VERSION=`cargo read-manifest --manifest-path=$THE_ROOT/mmtk/Cargo.toml | python3 -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["v8"]["v8_version"])'` # The commit after this requires python 3.7. This is the only reason we fix to this revision. -export DEPOT_TOOLS_VERSION=`cargo read-manifest --manifest-path=$THE_ROOT/mmtk/Cargo.toml | python -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["v8"]["depot_tools_version"])'` +export DEPOT_TOOLS_VERSION=`cargo read-manifest --manifest-path=$THE_ROOT/mmtk/Cargo.toml | python3 -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["v8"]["depot_tools_version"])'` export RUSTUP_TOOLCHAIN=`cat $THE_ROOT/mmtk/rust-toolchain`