diff options
author | Andrew Kaster <akaster@serenityos.org> | 2021-09-07 02:21:36 -0600 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-09-15 19:04:52 +0430 |
commit | b5c98ede084e5d29b8586f3bb2bf134184d372be (patch) | |
tree | 7f4ece17df372bbe5dd27c5063b67195e1f578ea /Meta/build-root-filesystem.sh | |
parent | 904a268872416dc9b9f26c83fd0b1bd8b715c511 (diff) | |
download | serenity-b5c98ede084e5d29b8586f3bb2bf134184d372be.zip |
Meta: Switch to a SuperBuild that splits host and target builds
Replace the old logic where we would start with a host build, and swap
all the CMake compiler and target variables underneath it to trick
CMake into building for Serenity after we configured and built the Lagom
code generators.
The SuperBuild creates two ExternalProjects, one for Lagom and one for
Serenity. The Serenity project depends on the install stage for the
Lagom build. The SuperBuild also generates a CMakeToolchain file for the
Serenity build to use that replaces the old toolchain file that was only
used for Ports.
To ensure that code generators are rebuilt when core libraries such as
AK and LibCore are modified, developers will need to direct their manual
`ninja` invocations to the SuperBuild's binary directory instead of the
Serenity binary directory.
This commit includes warning coalescing and option style cleanup for the
affected CMakeLists in the Kernel, top level, and runtime support
libraries. A large part of the cleanup is replacing USE_CLANG_TOOLCHAIN
with the proper CMAKE_CXX_COMPILER_ID variable, which will no longer be
confused by a host clang compiler.
Diffstat (limited to 'Meta/build-root-filesystem.sh')
-rwxr-xr-x | Meta/build-root-filesystem.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index 33cbe10c49..3dd09ceaf0 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -48,7 +48,7 @@ fi SERENITY_ARCH="${SERENITY_ARCH:-i686}" LLVM_VERSION="${LLVM_VERSION:-12.0.1}" -if [ "$USE_CLANG_TOOLCHAIN" = "1" ]; then +if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then TOOLCHAIN_DIR="$SERENITY_SOURCE_DIR"/Toolchain/Local/clang/"$SERENITY_ARCH" 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 |