Commit Graph

22 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
3f3a214411 build-scripts/build_llvm.py: bump to llvm 19
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4210

why 19, 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
while we can use different versions for different targets,
it's nicer to use the same version everywhere when possible.
2025-05-07 13:16:29 +09:00
Huang Qi
d86bd7c0bc fix(build_llvm.py): clean up whitespace and formatting in build script
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-02-15 16:25:21 +08:00
Huang Qi
46904dce0f build_llvm.py: Allow to build xtensa target on non-xtensa host
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-02-14 16:15:45 +08:00
TianlongLiang
f2b87d773e
Support external toolchain on Windows for aot compiler ()
allowing custom ARC toolchain on Windows
2024-11-19 17:47:05 +08:00
TianlongLiang
1af474099b
Add Windows wamrc and iwasm build in release CI ()
- For Windows, llvm libs need to cache more directories, so use a multi-line
  environment variable for paths
- Remove conditionally build directories `win32build`, just use `build` for all platform
- Add Windows wamrc and iwasm(disable lib pthread semaphore and fast jit for now)
  build in release CI
2024-10-17 10:01:56 +08:00
Wenyong Huang
1434c45283
build_llvm.py: Speed up llvm build with multi procs on windows () 2024-06-13 17:18:21 +08:00
YAMAMOTO Takashi
8f098a5905
aot: Make precheck functions use short-call for xtensa ()
Note: this breaks AOT ABI for xtensa again because of a revert of an ABI-breaking change.
2024-05-13 16:55:00 +08:00
Wenyong Huang
78be221594
Fix build llvm on macos ()
Perf support is available on Linux only.
2023-12-07 11:09:36 +08:00
Wenyong Huang
67a887e2d3
Fix compilation warnings on Windows () 2023-12-06 16:12:33 +08:00
liang.he
8aa813f44a
Generate jitdump to support linux perf for LLVM JIT () 2023-11-27 15:42:00 +08:00
Wenyong Huang
8d88471c46
Implement AOT static PGO ()
LLVM PGO (Profile-Guided Optimization) allows the compiler to better optimize code
for how it actually runs. This PR implements the AOT static PGO, and is tested on
Linux x86-64 and x86-32. The basic steps are:

1. Use `wamrc --enable-llvm-pgo -o <aot_file_of_pgo> <wasm_file>`
   to generate an instrumented aot file.
2. Compile iwasm with `cmake -DWAMR_BUILD_STATIC_PGO=1` and run
      `iwasm --gen-prof-file=<raw_profile_file> <aot_file_of_pgo>`
    to generate the raw profile file.
3. Run `llvm-profdata merge -output=<profile_file> <raw_profile_file>`
    to merge the raw profile file into the profile file.
4. Run `wamrc --use-prof-file=<profile_file> -o <aot_file> <wasm_file>`
    to generate the optimized aot file.
5. Run the optimized aot_file: `iwasm <aot_file>`.

The test scripts are also added for each benchmark, run `test_pgo.sh` under
each benchmark's folder to test the AOT static pgo.
2023-06-05 09:17:39 +08:00
Xu Jun
76b8225dac
Fix key error in build_llvm.py () 2023-03-07 17:48:26 +08:00
Kevin0626
e8fe2d1c42
support SSH for git clone llvm ()
Co-authored-by: Kevin Kang <wilson.qch1685@gmail.com>
2023-03-07 17:05:36 +08:00
Xu Jun
e6a0184797
enable custom llvm build flags () 2023-03-06 06:50:53 +08:00
Hritik Gupta
3d44f11d19
Add gh api call for fetching llvm version ()
Fixes 
2023-02-09 07:49:07 +08:00
Wenyong Huang
27e7e160af
Upgrade toolkits ()
Upgrade the version of related toolkits:
- upgrade llvm to 15.0
- upgrade wasi-sdk to 19.0
- upgrade emsdk to 3.1.28
- upgrade wabt to 1.0.31
- upgrade binaryen to 111

And upgrade the CI scripts, sample workload build scripts, Dockerfiles, and documents.
2023-02-02 09:42:25 +08:00
dongsheng28849455
c4defb8877
Update xtensa LLVM version to 15.x ()
Fix the issue that xtensa .aot size cannot be over 256K.
2022-11-24 12:48:31 +08:00
Wenyong Huang
9b858c43cb
Fix build wamrc for xtensa failure ()
Fix build wamrc failure when using llvm xtensa version, and update
xtensa llvm version to 13.0.0.
2022-04-23 20:25:40 +08:00
lucianoiam
c8804c1ff9
Allow to build LLVM and wamrc on MinGW ()
Use sysconfig.get_platform() to check whether the platform is MinGW,
and link necessary libraries to wamrc on MinGW.
2022-02-18 17:40:18 +08:00
liang.he
3d5a0bff0f
Enhance workflows by caching llvm directories directly ()
Enhance workflows by caching llvm directories directly instead of
caching the llvm-xxx.tar.gz packages, so as to reduce the time
consumption of unpacking the cached LLVM packages.
2021-10-27 17:26:17 +08:00
Wenyong Huang
03494f9487
Refactor CI rules: merge ubuntu/macos/android, enable spec test ()
Refactor CI rules:
- merge ubuntu/macos/android into one job file
- add job file to test spec cases
- add compilation for lazy jit, debug interpreter and debug aot
- add compilation for performance profile, dump call stack and mini-loader
- re-org llvm build script to build lldb

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-11 20:32:29 +08:00
Wenyong Huang
7be0d385a6
Implement SIMD latest opcodes and update LLVM to 13.0 ()
Implement the latest SIMD opcodes and update LLVM 13.0,
update the llvm build scripts, update the sample workloads‘ build scripts,
and build customized wasi-sdk to build some workloads.
Also refine the CI rules.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-09-17 19:12:57 +08:00