aboutsummaryrefslogtreecommitdiff
path: root/projects/wasmtime/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'projects/wasmtime/build.sh')
-rwxr-xr-xprojects/wasmtime/build.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/projects/wasmtime/build.sh b/projects/wasmtime/build.sh
index d302851aa..38a9e6291 100755
--- a/projects/wasmtime/build.sh
+++ b/projects/wasmtime/build.sh
@@ -26,6 +26,13 @@ build() {
shift
PROJECT_DIR=$SRC/$project
+ # ensure we get absolute paths for the coverage report
+ cd $PROJECT_DIR
+ crate_src_abspath=`cargo metadata --no-deps --format-version 1 | jq -r '.workspace_root'`
+ while read i; do
+ export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix $i=$crate_src_abspath/$i"
+ done <<< "$(find . -name "*.rs" | cut -d/ -f2 | uniq)"
+
cd $PROJECT_DIR/fuzz && cargo fuzz build -O --debug-assertions "$@"
FUZZ_TARGET_OUTPUT_DIR=$PROJECT_DIR/target/x86_64-unknown-linux-gnu/release