Skip to content

Commit 976e347

Browse files
committed
Use cross to compile mmtk-v8
1 parent 973b6d2 commit 976e347

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.github/scripts/args-debug.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ v8_third_party_heap_files = [
2323
"$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.h",
2424
"$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.cc"
2525
]
26-
v8_third_party_heap_libs = [ "$the_root/mmtk/target/debug/libmmtk_v8.so" ]
26+
v8_third_party_heap_libs = [ "$the_root/mmtk/target/x86_64-unknown-linux-gnu/debug/libmmtk_v8.so" ]

.github/scripts/args-optdebug.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ v8_third_party_heap_files = [
2222
"$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.h",
2323
"$the_root/v8/third_party/heap/mmtk/mmtkUpcalls.cc"
2424
]
25-
v8_third_party_heap_libs = [ "$the_root/mmtk/target/debug/libmmtk_v8.so" ]
25+
v8_third_party_heap_libs = [ "$the_root/mmtk/target/x86_64-unknown-linux-gnu/debug/libmmtk_v8.so" ]

.github/scripts/build-mmtk.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ set -xe
22

33
. $(dirname "$0")/common.sh
44

5+
export PATH=~/.cargo/bin:$PATH
6+
# Check if we have cross available
7+
if ! [ -x "$(command -v cross)" ]; then
8+
echo 'Cross is not available. Will install cross.' >&2
9+
# lock to version 0.2.4. This version uses libc 2.31 for x86_64.
10+
# This matches the version in the sysroot used by V8 (debian bullseye)
11+
cargo install cross@0.2.4 --git https://github.com/cross-rs/cross
12+
fi
13+
514
# simply build mmtk-v8 with nogc
615
cd $THE_ROOT/mmtk
7-
rustup run $RUSTUP_TOOLCHAIN cargo build --features nogc
16+
cross build --target x86_64-unknown-linux-gnu --features nogc

.github/scripts/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export THE_ROOT=`realpath $(dirname "$0")/../..`
55
export V8_ROOT=$THE_ROOT/deps
66

77
# Test with a specific revision.
8-
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"])'`
8+
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"])'`
99
# The commit after this requires python 3.7. This is the only reason we fix to this revision.
10-
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"])'`
10+
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"])'`
1111

1212
export RUSTUP_TOOLCHAIN=`cat $THE_ROOT/mmtk/rust-toolchain`

0 commit comments

Comments
 (0)