Enable spectest on riscv64 (#2843)

Fix relocation issues on riscv and update test scripts and CI to enable
test spec cases on riscv QEMU.
This commit is contained in:
Huang Qi
2023-12-04 14:22:47 +08:00
committed by GitHub
parent 157c289d07
commit 453a29a9d4
3 changed files with 89 additions and 55 deletions

View File

@ -1072,6 +1072,17 @@ def compile_wasm_to_aot(wasm_tempfile, aot_tempfile, runner, opts, r, output = '
# exception isn't thrown in several cases
cmd.append("--disable-llvm-lto")
# Bounds checks is disabled by default for 64-bit targets, to
# use the hardware based bounds checks. But it is not supported
# in QEMU with NuttX.
# Enable bounds checks explicitly for all targets if running in QEMU.
if opts.qemu:
cmd.append("--bounds-checks=1")
# RISCV64 requires -mcmodel=medany, which can be set by --size-level=1
if test_target.startswith("riscv64"):
cmd.append("--size-level=1")
cmd += ["-o", aot_tempfile, wasm_tempfile]
log("Running: %s" % " ".join(cmd))