Meta: Update Clang version requirement to 17+

This commit is contained in:
Andreas Kling 2024-05-10 17:15:57 +02:00
parent 01ec56f1ed
commit 76df5ae030
Notes: sideshowbarker 2024-07-18 00:41:35 +09:00
5 changed files with 9 additions and 9 deletions

View file

@ -11,9 +11,9 @@ sudo apt install build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2
``` ```
Optional: `fuse2fs` for [building images without root](https://github.com/SerenityOS/serenity/pull/11224). Optional: `fuse2fs` for [building images without root](https://github.com/SerenityOS/serenity/pull/11224).
#### GCC 12 or Clang 15 #### GCC 12 or Clang 17
A host compiler that supports C++23 features is required for building host tools, the newer the better. Tested versions include gcc-12 and clang-15. A host compiler that supports C++23 features is required for building host tools, the newer the better. Tested versions include gcc-12 and clang-17.
On Ubuntu gcc-12 is available in the repositories of 22.04 (Jammy) and later. On Ubuntu gcc-12 is available in the repositories of 22.04 (Jammy) and later.
If you are running an older version, you will either need to upgrade, or find an alternative installation source. If you are running an older version, you will either need to upgrade, or find an alternative installation source.

View file

@ -2,7 +2,7 @@
## Build Prerequisites ## Build Prerequisites
Qt6 development packages and a C++23 capable compiler are required. g++-12 or clang-15 are required at a minimum for c++23 support. Qt6 development packages and a C++23 capable compiler are required. g++-12 or clang-17 are required at a minimum for c++23 support.
NOTE: In all of the below lists of packages, the Qt6 multimedia package is not needed if your Linux system supports PulseAudio. NOTE: In all of the below lists of packages, the Qt6 multimedia package is not needed if your Linux system supports PulseAudio.
@ -69,7 +69,7 @@ On OpenIndiana:
Note that OpenIndiana's latest GCC port (GCC 11) is too old to build Ladybird, so you need Clang, which is available in the repository. Note that OpenIndiana's latest GCC port (GCC 11) is too old to build Ladybird, so you need Clang, which is available in the repository.
``` ```
pfexec pkg install cmake ninja clang-15 libglvnd qt6 pfexec pkg install cmake ninja clang-17 libglvnd qt6
``` ```
On Haiku: On Haiku:

View file

@ -14,7 +14,7 @@ die() {
pick_clang() { pick_clang() {
local BEST_VERSION=0 local BEST_VERSION=0
for CLANG_CANDIDATE in clang clang-15 clang-16 clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang ; do for CLANG_CANDIDATE in clang clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang ; do
if ! command -v $CLANG_CANDIDATE >/dev/null 2>&1; then if ! command -v $CLANG_CANDIDATE >/dev/null 2>&1; then
continue continue
fi fi

View file

@ -5,7 +5,7 @@ project(LibJSGCVerifier C CXX)
set(LAGOM_BUILD OFF CACHE BOOL "Build without the serenity toolchain Clang") set(LAGOM_BUILD OFF CACHE BOOL "Build without the serenity toolchain Clang")
if (LAGOM_BUILD) if (LAGOM_BUILD)
find_package(Clang 16 CONFIG REQUIRED) find_package(Clang 17 CONFIG REQUIRED)
else() else()
find_package(Clang CONFIG REQUIRED HINTS "../../../../Toolchain/Local/clang") find_package(Clang CONFIG REQUIRED HINTS "../../../../Toolchain/Local/clang")
endif() endif()

View file

@ -56,7 +56,7 @@ pick_host_compiler() {
return return
fi fi
find_newest_compiler clang clang-15 clang-16 clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang find_newest_compiler clang clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang
if is_supported_compiler "$HOST_COMPILER"; then if is_supported_compiler "$HOST_COMPILER"; then
export CC="${HOST_COMPILER}" export CC="${HOST_COMPILER}"
export CXX="${HOST_COMPILER/clang/clang++}" export CXX="${HOST_COMPILER/clang/clang++}"
@ -71,8 +71,8 @@ pick_host_compiler() {
fi fi
if [ "$(uname -s)" = "Darwin" ]; then if [ "$(uname -s)" = "Darwin" ]; then
die "Please make sure that Xcode 14.3, Homebrew Clang 15, or higher is installed." die "Please make sure that Xcode 14.3, Homebrew Clang 17, or higher is installed."
else else
die "Please make sure that GCC version 12, Clang version 15, or higher is installed." die "Please make sure that GCC version 12, Clang version 17, or higher is installed."
fi fi
} }