mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
Meta: Document that clang-15 is required, and update the compiler checks
We require clang-15 for consteval.
This commit is contained in:
parent
b4939295c2
commit
421aa8da1e
4 changed files with 8 additions and 8 deletions
|
@ -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 14
|
#### GCC 12 or Clang 15
|
||||||
|
|
||||||
A host compiler that supports C++20 features is required for building host tools, the newer the better. Tested versions include gcc-12 and clang-14.
|
A host compiler that supports C++20 features is required for building host tools, the newer the better. Tested versions include gcc-12 and clang-15.
|
||||||
|
|
||||||
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.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Build Prerequisites
|
## Build Prerequisites
|
||||||
|
|
||||||
Qt6 development packages and a C++20 capable compiler are required. gcc-12 or clang-14 are required at a minimum for c++20 support.
|
Qt6 development packages and a C++20 capable compiler are required. gcc-12 or clang-15 are required at a minimum for c++20 support.
|
||||||
|
|
||||||
On Debian/Ubuntu required packages include, but are not limited to:
|
On Debian/Ubuntu required packages include, but are not limited to:
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ die() {
|
||||||
|
|
||||||
pick_clang() {
|
pick_clang() {
|
||||||
local BEST_VERSION=0
|
local BEST_VERSION=0
|
||||||
for CLANG_CANDIDATE in clang clang-14 clang-15 clang-16 /opt/homebrew/opt/llvm/bin/clang ; do
|
for CLANG_CANDIDATE in clang clang-15 clang-16 /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
|
||||||
|
|
|
@ -157,7 +157,7 @@ is_supported_compiler() {
|
||||||
[ "$BUILD_VERSION" -ge 14030022 ] && return 0
|
[ "$BUILD_VERSION" -ge 14030022 ] && return 0
|
||||||
elif $COMPILER --version 2>&1 | grep "clang" >/dev/null; then
|
elif $COMPILER --version 2>&1 | grep "clang" >/dev/null; then
|
||||||
# Clang version check
|
# Clang version check
|
||||||
[ "$MAJOR_VERSION" -ge 14 ] && return 0
|
[ "$MAJOR_VERSION" -ge 15 ] && return 0
|
||||||
else
|
else
|
||||||
# GCC version check
|
# GCC version check
|
||||||
[ "$MAJOR_VERSION" -ge 12 ] && return 0
|
[ "$MAJOR_VERSION" -ge 12 ] && return 0
|
||||||
|
@ -191,7 +191,7 @@ pick_host_compiler() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find_newest_compiler clang clang-14 clang-15 clang-16 /opt/homebrew/opt/llvm/bin/clang
|
find_newest_compiler clang clang-15 clang-16 /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++}"
|
||||||
|
@ -206,9 +206,9 @@ 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 14, or higher is installed."
|
die "Please make sure that Xcode 14.3, Homebrew Clang 15, or higher is installed."
|
||||||
else
|
else
|
||||||
die "Please make sure that GCC version 12, Clang version 14, or higher is installed."
|
die "Please make sure that GCC version 12, Clang version 15, or higher is installed."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue