spec-test-script/runtest.py: --size-level=0 for x86-64

with the recent version of LLVM, wamrc --size-level=1 often
generates R_X86_64_32S relocations which fail on load with
the infamous error:

"relocation truncated to fit R_X86_64_32S failed"

it seems that these relocations are often for jump tables.

this commit workarounds it with --size-level=0.

an alternative is to disable jump tables. (although it seems that
jump tables are not the only source of these relocations.)

cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3035

it might be better to do this in wamrc itself. however, currently
target info is not available there in case of native compilation.
related: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3356
This commit is contained in:
YAMAMOTO Takashi 2025-04-25 11:15:42 +09:00
parent 3f3a214411
commit 766145a166

View File

@ -46,7 +46,8 @@ temp_module_table = {}
aot_target_options_map = {
"i386": ["--target=i386"],
"x86_32": ["--target=i386"],
"x86_64": ["--target=x86_64", "--cpu=skylake"],
# cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3035
"x86_64": ["--target=x86_64", "--cpu=skylake", "--size-level=0"],
"aarch64": ["--target=aarch64", "--target-abi=eabi", "--cpu=cortex-a53"],
"aarch64_vfp": ["--target=aarch64", "--target-abi=gnueabihf", "--cpu=cortex-a53"],
"armv7": ["--target=armv7", "--target-abi=eabi", "--cpu=cortex-a9", "--cpu-features=-neon"],