diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-08-13 12:11:12 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-17 17:09:58 +0100 |
commit | 06fc64be13d933a47232243732dc8ca8313374ed (patch) | |
tree | 8dd3a60deffe21fd52a17f164abadddb6904521a /Meta/build-root-filesystem.sh | |
parent | 28c088cd9104b7b4fbcfe860a718291da3f9a5f3 (diff) | |
download | serenity-06fc64be13d933a47232243732dc8ca8313374ed.zip |
Toolchain+Meta: Update LLVM version to 13.0.0
This commit updates the Clang toolchain's version to 13.0.0, which comes
with better C++20 support and improved handling of new features by
clang-format. Due to the newly enabled `-Bsymbolic-functions` flag, our
Clang binaries will only be 2-4% slower than if we dynamically linked
them, but we save hundreds of megabytes of disk space.
The `BuildClang.sh` script has been reworked to build the entire
toolchain in just three steps: one for the compiler, one for GNU
binutils, and one for the runtime libraries. This reduces the complexity
of the build script, and will allow us to modify the CI configuration to
only rebuild the libraries when our libc headers change.
Most of the compile flags have been moved out to a separate CMake cache
file, similarly to how the Android and Fuchsia toolchains are
implemented within the LLVM repo. This provides a nicer interface than
the heaps of command-line arguments.
We no longer build separate toolchains for each architecture, as the
same Clang binary can compile code for multiple targets.
The horrible mess that `SERENITY_CLANG_ARCH` was, has been removed in
this commit. Clang happily accepts an `i686-pc-serenity` target triple,
which matches what our GCC toolchain accepts.
Diffstat (limited to 'Meta/build-root-filesystem.sh')
-rwxr-xr-x | Meta/build-root-filesystem.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index 3dd09ceaf0..5ee609b39d 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -46,14 +46,13 @@ else fi SERENITY_ARCH="${SERENITY_ARCH:-i686}" -LLVM_VERSION="${LLVM_VERSION:-12.0.1}" +LLVM_VERSION="${LLVM_VERSION:-13.0.0}" if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then - TOOLCHAIN_DIR="$SERENITY_SOURCE_DIR"/Toolchain/Local/clang/"$SERENITY_ARCH" + TOOLCHAIN_DIR="$SERENITY_SOURCE_DIR"/Toolchain/Local/clang/ mkdir -p mnt/usr/lib/clang/"$LLVM_VERSION"/lib/serenity - $CP "$TOOLCHAIN_DIR"/lib/clang/"$LLVM_VERSION"/lib/serenity/* mnt/usr/lib/clang/"$LLVM_VERSION"/lib/serenity - $CP "$TOOLCHAIN_DIR"/lib/libunwind* mnt/usr/lib - $CP "$TOOLCHAIN_DIR"/lib/libc++* mnt/usr/lib + $CP "$TOOLCHAIN_DIR"/lib/clang/"$LLVM_VERSION"/lib/"$SERENITY_ARCH"-pc-serenity/* mnt/usr/lib/clang/"$LLVM_VERSION"/lib/serenity + $CP "$TOOLCHAIN_DIR"/lib/"$SERENITY_ARCH"-pc-serenity/* mnt/usr/lib elif [ "$SERENITY_ARCH" != "aarch64" ]; then $CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/"$SERENITY_ARCH"/"$SERENITY_ARCH"-pc-serenity/lib/libgcc_s.so mnt/usr/lib fi |