1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

Documentation: Clarify that clang can be used as a host compiler

This commit is contained in:
Andrew Kaster 2022-12-17 15:39:53 -07:00 committed by Andrew Kaster
parent 37517ba8bb
commit 75f7a164a6
2 changed files with 16 additions and 6 deletions

View file

@ -11,7 +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).
#### GCC 12
#### GCC 12 or Clang 13
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-13.
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.

View file

@ -13,7 +13,7 @@ Make sure you also have all the following dependencies installed:
```console
# core
brew install coreutils e2fsprogs qemu bash gcc@12 imagemagick ninja cmake ccache rsync zstd
brew install coreutils e2fsprogs qemu bash imagemagick ninja cmake ccache rsync zstd
# (option 1) fuse + ext2
brew install m4 autoconf automake libtool
@ -24,14 +24,22 @@ Toolchain/BuildFuseExt2.sh
brew install genext2fs
```
If you have Xcode version 13 or older, also install a newer host compiler from homebrew. Xcode 14 is known to work.
```console
brew install llvm@15
# OR
brew install gcc@12
```
# Notes
If you're building on M1 Mac and have Homebrew installed in both Rosetta and native environments,
you have to make sure that required packages are installed only in one of the environments. Otherwise,
these installations can conflict during the build process, which is manifested in hard to diagnose issues.
Building on M1 natively without Rosetta is recommended, as the build process should be faster without Rosetta
overhead.
Notes:
Installing macfuse for the first time requires enabling its system extension in System Preferences and then restarting your machine. The output from installing macfuse with brew says this, but it's easy to miss.
- Installing macfuse for the first time requires enabling its system extension in System Preferences and then restarting
your machine. The output from installing macfuse with brew says this, but it's easy to miss.
- It's important to make sure that Xcode is not only installed but also accordingly updated, otherwise CMake will run into incompatibilities with GCC.
It's important to make sure that Xcode is not only installed but also accordingly updated, otherwise CMake will run into incompatibilities with GCC.