Skip to content

Commit 908838a

Browse files
authored
build-scripts/build_llvm.py: bump to llvm 18 (#4259)
* build-scripts/build_llvm.py: bump to llvm 18 cf. #4210 why not 20? because, as of writing this, 19 is the latest released version for the xtensa fork of llvm: https://github.com/espressif/llvm-project why not 19? because of a bug in the xtensa fork of llvm: espressif/llvm-project#112 while we can use different versions for different targets, it's nicer to use the same version everywhere when possible. * 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. #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 * wamr-compiler: size_level=0 for sgx mode cf. #3035
1 parent 1a72dcf commit 908838a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

build-scripts/build_llvm.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,17 @@ def main():
294294
"arc": {
295295
"repo": "https://github.com/llvm/llvm-project.git",
296296
"repo_ssh": "git@github.com:llvm/llvm-project.git",
297-
"branch": "release/15.x",
297+
"branch": "release/18.x",
298298
},
299299
"xtensa": {
300300
"repo": "https://github.com/espressif/llvm-project.git",
301301
"repo_ssh": "git@github.com:espressif/llvm-project.git",
302-
"branch": "xtensa_release_17.0.1",
302+
"branch": "xtensa_release_18.1.2",
303303
},
304304
"default": {
305305
"repo": "https://github.com/llvm/llvm-project.git",
306306
"repo_ssh": "git@github.com:llvm/llvm-project.git",
307-
"branch": "release/15.x",
307+
"branch": "release/18.x",
308308
},
309309
}
310310

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

+2-1
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"],

wamr-compiler/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ main(int argc, char *argv[])
712712
}
713713

714714
if (sgx_mode) {
715-
option.size_level = 1;
715+
option.size_level = 0;
716716
option.is_sgx_platform = true;
717717
}
718718

0 commit comments

Comments
 (0)