Commit graph

17 commits

Author SHA1 Message Date
Dan Klishch fa1eef8bbe Toolchain: Update LLVM to 18.1.3
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.
2024-04-18 13:14:33 -06:00
Idan Horowitz f7a1f28d7f Kernel: Add initial basic support for KASAN
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.
2023-12-30 13:57:10 +01:00
kleines Filmröllchen 0b91d36a1e Toolchain: Build Clang with RISC-V support 2023-08-11 13:35:17 +02:00
implicitfield 941d68ac2d Toolchain+Ports: Update LLVM to 16.0.6 2023-06-27 12:40:38 +02:00
Tim Schumacher 18565dd286 Ports/llvm: Increase the default stack size for LLVM executables 2023-04-14 10:05:05 +02:00
Liav A 55f17fff36 Meta: Remove i686 target 2022-12-28 11:53:41 +01:00
Tim Schumacher 335fd20c34 Toolchain: Keep LLVM from using shm_open and friends
I originally missed this while handling the upgrade to LLVM 15 (as it
only affects the on-serenity port), so the patch gets to be here with a
bit of a delay.

Co-Authored-By: sin-ack <sin-ack@users.noreply.github.com>
2022-10-21 20:15:34 +02:00
Tim Schumacher 24987e2b1f Toolchain: Add SerenityOS to the LLVM config.guess 2022-10-14 12:57:55 +02:00
Tim Schumacher cb2f0d9861 Toolchain: Regenerate patches using the latest format rules 2022-09-18 13:00:46 +04:30
Tim Schumacher 77f124c87a Toolchain: Remove references to -lm 2022-09-16 16:09:19 +00:00
Tim Schumacher f45238db0f Toolchain: Update to LLVM 15.0.0 2022-09-16 05:39:28 +00:00
Tim Schumacher a857b6297a Toolchain: Don't pass -lpthread when pthreads are requested
This is essentially a no-op since we have our replacement linker script,
but if we can skip over that entirely, why not?
2022-07-19 11:00:35 +01:00
Andrew Kaster 010190beb8 Toolchain: Remove workarounds for initializer_list and _aligned_alloc
These are no longer required to use libc++ on Serenity
2022-06-30 12:34:16 +01:00
Andrew Kaster efc1805b8f Toolchain: Create separate serenity xlocale support file 2022-06-30 12:34:16 +01:00
Andrew Kaster d889294036 Toolchain: Format llvm patches per new patch format
This removes the patch series 1/N comments, git version at the bottom of
the patch, and zeros out the original commit hash.
2022-06-30 12:34:16 +01:00
Andrew Kaster 4334bd06b8 Toolchain: Enable LLVM Profile instrumentation
Add a patch to let llvm's InstrProfiling modules know serenity supports
all the Unix-y features required to make -fprofile-instr-generate and
-fcoverage-mapping work properly on target.
2022-05-02 01:46:18 +02:00
Daniel Bertalan 01b31d9858 Toolchain+Ports: Update LLVM to 14.0.1
Besides a version bump, the following changes have been made to our
toolchain infrastructure:
- LLVM/Clang is now built with -march=native if the host compiler
  supports it. An exception to this is CI, as the toolchain cache is
  shared among many different machines there.
- The LLVM tarball is not re-extracted if the hash of the applied
  patches doesn't differ.
- The patches have been split up into atomic chunks.
- Port-specific patches have been integrated into the main patches,
  which will aid in the work towards self-hosting.
- <sysroot>/usr/local/lib is now appended to the linker's search path by
  default.
- --pack-dyn-relocs=relr is appended to the linker command line by
  default, meaning ports take advantage of RELR relocations without any
  patches or additional compiler flags.

The formatting of LLVM port's package.sh has been bothering me, so I
also indented the arguments to the CMake invocation.
2022-04-23 10:43:32 -07:00