To upgrade the underlying LLVM version you need to:
- Update the submodule in this project (see below)
- Update the version in
docker/sysroot.dockerfile - Update the version in
faasmtools - Update
Makefile - Grep the project for any other mentions of the LLVM version
- Run the
inv container.toolchaintask - Test it out
- Run the
inv container.push-toolchaintask
Find the commit related to tag name for the desired release in
the LLVM repo (e.g.
llvmorg-10.0.1), then:
cd third-party/llvm-project
git checkout main
git fetch origin
git checkout <tag-name>To rebuild LLVM, there a couple of options. To rebuild just libc:
make clean-libc
makeTo rebuilding all the libs, i.e. libc, libcxx, libcxxabi and compiler-rt:
make clean-libs
makeThe final option is to rebuild everything, including Clang. This only necessary if you need to change the underlying LLVM or Clang configuration:
make clean-all
makeIf a given project fails you need to go to the build dir (e.g. for libcxx this
would be third-party/llvm-project/build/libcxx) then look at
CMakeFiles/CMakeError.log and CMakeFiles/CMakeOutput.log.
One thing to check for is the magic libclang_rt.builtins-wasm32.tar.gz file.
This should get built by the build process but if you need to fiddle with it you
can download it as part of the WASI SDK
Release.