There is no functional change here, but they added an error message to
the install output to indicate what host tools need to be installed.
This has tripped some people up, so it seems worth updating to.
And hook it into ladybird.sh for convenience. The script will set up
PATH and other environment variables automatically.
On CI, vcpkg is theoretically already installed on Linux machines, but
not with the right environment variables, and not on macOS. So this also
makes CI use this script to bootstrap vcpkg.
Allowing an environment variable to enable/disable the build for clangd
and other toolchains will improve the developer-experience than
reconfiguring and building the toolchain manually.
Now you will have to call the command as following
$ CLANG_ENABLE_CLANGD=ON Toolchain/BuildClang.sh
Currently, if building under `nix-shell Toolchain`, serenityOS'
gcc won't build because of hardening options added in nix,
more specifically the breaking format-security.
Apart from bumping the toolchain Clang's and port's version, this commit
completely overhauls the way LLVM toolchain is built.
First, it gets rid of a complicated two-stage process of first compiling
clang and compiler-rt builtins and then building libunwind, libc++abi,
and libc++ -- it is possible to create a complete cross-compilation
toolchain in a single CMake invocation with a modern LLVM. Moreover, the
old method was inherently unsupported and subtly broken.
Next, it utilizes full potential of the Stubs "framework". Now we are
even able to compile Clang with -Wl,-z,defs which makes one of the
patches obsolete and the whole installation less error-prone. Note that
it comes at a cost of complicating the bootstrap process on a completely
novel architecture but this hopefully won't happen often.
Lastly, it fixes handling of the -no*lib* family of flags in the
Serenity LLVM driver and correctly uses -nostartfiles in conjunction
with stubs to make necessary CMake configure-time checks succeed.
This commit adds minimal support for compiler-instrumentation based
memory access sanitization.
Currently we only support detection of kmalloc redzone accesses, and
kmalloc use-after-free accesses.
Support for inline checks (for improved performance), and for stack
use-after-return and use-after-return detection is left for future PRs.
This patch updates the flake to track the nixos-unstable branch instead
of master for the nixpkgs flake input.
This ensures that hydra.nixos.org (the NixOS CI) has built all packages,
made them available in the cache.nixos.org binary cache without the risk
of a definitions (evalulation) being broken on master.
The gen.py script only generates the build.ninja file for GN. We have to
explicitly build it afterwards.
This also sets the executable bit on BuildGN.sh.
This is a minor bugfix release, which to my knowledge contains nothing
of importance to us. However, there is one QoL change to our patches.
We no longer force `-fpic` in the compiler driver, and instead use the
`--enable-default-pie` configure option to generate position-independent
code suitable for executables. For building shared libraries, the
`-fpic` flag must be specified explicitly.
This version contains my patch that adds support for the proprietary
VideoCore mailbox message for reading the kernel command line, so
patches aren't needed anymore.
Add another dev shell to `Toolchain/flake.nix` called `ladybird.nix`
that pulls in the dependencies for building Ladybird.
Also update the documentation to mention building with a flake.
Let users save their nix develop derivation in a profile by ignoring
this specific folder. It encourages the following workflow:
```
nix develop Toolchain/ --profile Toolchain/nix-profiles/dev
```
Which stops the dev enviornment being collected in the nix store. Later
devs can come back and do:
```
nix develop Toolchain/nix-profiles/dev
```
To continue where they left off, without having to download everything
from nixpkgs again.
xlibswrapper is removed from `Toolchain/serenity.nix` as it is a
wrapper package and has been deprecated. We don't use it in the build
anyway.
This fixes#19286
During the build, python3 is required so we add `python3` as a build
dependency.
Add a nix flake to `Toolchain/` that wraps the existing nix derivation
`Toolchain/serenity.nix`. This also comes with a lockfile making the nix
developer enviornment setup more reproducible.
We also update the documentation for "other builds" to mention the
flake.
This is a minimal set of changes to allow `serenity.sh build riscv64` to
successfully generate the build environment and start building. This
includes some, but not all, assembly stubs that will be needed later on;
they are currently empty.
We were previously missing `Kernel/Arch`, which gets included by
`Kernel/API`.
While at it, remove `AK` from the list of copied headers for the
toolchain, as nothing in our LibC headers should ever publicly depend on
AK.
Also update the comment so that people remember to update the port at
the same time, and clarify that updating `cmake-version.cmake` is not
required if there is no change in cmake that we need in our buildsystem.
This is needed to avoid including LibC headers in Lagom builds.
Unfortunately, we cannot rely on the build machine to provide a
fully POSIX-compatible ELF header for Lagom builds, so we have to
use our own.
This service automatically redirects to a mirror that's geographically
closer, which should make downloading the tarballs faster. The GNU
project recommends this instead of bombarding their top-level downloads
site.
These are not useful for us, and unnecessarily waste time when building
the toolchain. Even if we used libstdc++ more heavily, our use of
uncommon, PCH-affecting flags and our frequent LibC header changes would
make these ineligible for use anyways.
Instead of manually compressing/decompressing a toolchain tarball if
`TRY_USE_LOCAL_TOOLCHAIN` is set, let's use the cache action's automatic
built-in compression (which is zstd, I believe).
The BFD linker requires the `COMMONPAGESIZE` emulation parameter to be
set in order to enable RELRO support for AArch64. As we are adding a
custom `emulparams` file anyways, let's also tell LD that our ELF
interpreter is called `/usr/lib/Loader.so`.
This commit also removes some vestigial references to i686 SerenityOS.
The one in `gas/configure.tgt` is still needed, as it also handles
x86_64.
This is a mostly straight-forward rebase of our patches on top of
13.1.0. The spec files needed a change, as GCC no longer supports STABS
debug information, but we were building GCC with support for it.
Highlights of this release include static `operator()`, The Equality
Operator You Are Looking For and extended `constexpr` support.