wasmtime: Try to fix coverage build (#7374)

Our coverage build for Wasmtime has been broken for a bit so this is a
bit of a shot in the dark to try and fix that. The broken build comes
from OCaml sources not being available and I couldn't figure out how to
get the coverage to not ask for the OCaml sources so this attempts to
copy the OCaml sources to the output directory for the coverage code to
use. We're not really interested in the coverage of OCaml itself, but
this should hopefully serve to appease the coverage gods.
This commit is contained in:
Alex Crichton 2022-03-10 21:20:48 -06:00 committed by GitHub
parent 74e6ce04b7
commit dd7c41fdaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -72,3 +72,10 @@ eval $(opam env)
build wasmtime "" "" build wasmtime "" ""
build wasm-tools wasm-tools- "" build wasm-tools wasm-tools- ""
build regalloc.rs regalloc- bt bt build regalloc.rs regalloc- bt bt
# In coverage builds copy the opam header files into the output so coverage can
# find the source files.
if [ "$SANITIZER" = "coverage" ]; then
cp --recursive --dereference --no-preserve mode,ownership --parents \
$HOME/.opam/4.11.2/lib/ocaml $OUT
fi