Skip to content

Commit 20be39b

Browse files
committed
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, often for jump tables. those relocations often fail on load with the infamous error: "relocation truncated to fit R_X86_64_32S failed" this commit workarounds it with --size-level=0. an alternative is to disable jump tables. cf. #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: #3356
1 parent 6e3f340 commit 20be39b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/wamr-test-suites/spec-test-script/runtest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
aot_target_options_map = {
4747
"i386": ["--target=i386"],
4848
"x86_32": ["--target=i386"],
49-
"x86_64": ["--target=x86_64", "--cpu=skylake"],
49+
# cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3035
50+
"x86_64": ["--target=x86_64", "--cpu=skylake", "--size-level=0"],
5051
"aarch64": ["--target=aarch64", "--target-abi=eabi", "--cpu=cortex-a53"],
5152
"aarch64_vfp": ["--target=aarch64", "--target-abi=gnueabihf", "--cpu=cortex-a53"],
5253
"armv7": ["--target=armv7", "--target-abi=eabi", "--cpu=cortex-a9", "--cpu-features=-neon"],

0 commit comments

Comments
 (0)