-
befd5f77
by Matthew Pickering at 2025-06-07T16:36:56+01:00
hadrian: Build stage 2 cross compilers
* Most of hadrian is abstracted over the stage in order to remove the
assumption that the target of all stages is the same platform. This
allows the RTS to be built for two different targets for example.
* Abstracts the bindist creation logic to allow building either normal
or cross bindists. Normal bindists use stage 1 libraries and a stage 2
compiler. Cross bindists use stage 2 libararies and a stage 2
compiler.
* hadrian: Make binary-dist-dir the default build target. This allows us
to have the logic in one place about which libraries/stages to build
with cross compilers. Fixes #24192
New hadrian target:
* `binary-dist-dir-cross`: Build a cross compiler bindist (compiler =
stage 1, libraries = stage 2)
-------------------------
Metric Decrease:
T10421a
T10858
T11195
T11276
T11374
T11822
T15630
T17096
T18478
T20261
Metric Increase:
parsing001
-------------------------
-
c3403e34
by Matthew Pickering at 2025-06-07T16:36:56+01:00
ci: Test cross bindists
We remove the special logic for testing in-tree cross
compilers and instead test cross compiler bindists, like we do for all
other platforms.
-
cd40edec
by Matthew Pickering at 2025-06-07T16:36:56+01:00
ci: Javascript don't set CROSS_EMULATOR
There is no CROSS_EMULATOR needed to run javascript binaries, so we
don't set the CROSS_EMULATOR to some dummy value.
-
59a8286e
by Matthew Pickering at 2025-06-07T16:36:56+01:00
ci: Introduce CROSS_STAGE variable
In preparation for building and testing stage3 bindists we introduce the
CROSS_STAGE variable which is used by a CI job to determine what kind of
bindist the CI job should produce.
At the moment we are only using CROSS_STAGE=2 but in the future we will
have some jobs which set CROSS_STAGE=3 to produce native bindists for a
target, but produced by a cross compiler, which can be tested on by
another CI job on the native platform.
CROSS_STAGE=2: Build a normal cross compiler bindist
CROSS_STAGE=3: Build a stage 3 bindist, one which is a native compiler and library for the target
-
7a0491cd
by Matthew Pickering at 2025-06-07T16:36:56+01:00
Split up system.config into host/target config files
There were a number of settings which were not applied per-stage, for
example if you specified `--ffi-include-dir` then that was applied to
both host and target. Now this will just be passed when building the
crosscompiler.
The solution for now is to separate these two files into host/target and
the host file contains very bare-bones . There isn't currently a way to
specify with configure anything in the host file, so if you are building
a cross-compiler and you need to do that, you have to modify the file
yourself.
-
8d27890a
by Matthew Pickering at 2025-06-07T16:36:56+01:00
wip fixup
-
b35de8d4
by Matthew Pickering at 2025-06-07T16:36:56+01:00
Fix location of emsdk-version
-
febe0abe
by Matthew Pickering at 2025-06-07T16:36:56+01:00
fix distrib/configure file
-
a72b0cc9
by Matthew Pickering at 2025-06-07T16:36:56+01:00
Fix hardcoded stage1
-
9956da02
by Matthew Pickering at 2025-06-07T16:36:56+01:00
Don't recache
-
d7b93178
by Matthew Pickering at 2025-06-07T16:36:56+01:00
hadrian: Make text_simdutf flavour transformer configurable per-stage
Before it was globally enabled, which was probably not what you want as
you don't need text-simd for your boot compiler nor your boot compiler
if you're building a cross-compiler.
This brings it into line with the other modifiers.. such as ghcProfiled
etc
Fixes #25302
-
5223aac3
by Matthew Pickering at 2025-06-07T16:36:56+01:00
hadrian: Refactor system-cxx-std-lib rules0
I noticed a few things wrong with the hadrian rules for `system-cxx-std-lib` rules.
* For `text` there is an ad-hoc check to depend on `system-cxx-std-lib` outside of `configurePackage`.
* The `system-cxx-std-lib` dependency is not read from cabal files.
* Recache is not called on the packge database after the `.conf` file is generated, a more natural place for this rule is `registerRules`.
Treating this uniformly like other packages is complicated by it not having any source code or a cabal file. However we can do a bit better by reporting the dependency firstly in `PackageData` and then needing the `.conf` file in the same place as every other package in `configurePackage`.
Fixes #25303
-
0d3d01e9
by Matthew Pickering at 2025-06-07T16:36:56+01:00
fixes for simdutf8
-
6dbfc20d
by Matthew Pickering at 2025-06-07T16:36:56+01:00
use building for target in llvm flavour transformer
-
f4f7f2b1
by Matthew Pickering at 2025-06-07T16:36:56+01:00
bindist: Pass path to package database we want to recache
This fixes recaching on cross compilers
-
6c078a2c
by Matthew Pickering at 2025-06-07T16:36:56+01:00
testsuite: T9930fail now passes on javascript
I didn't investigate why, but the comment says it should be fixed by
building a stage2 cross compiler (and it is).
-
ca273ac6
by Matthew Pickering at 2025-06-07T16:36:56+01:00
hadrian: Fix predicate for building shared libraries in defaultLibraries
Obviously we should only attempt to build shared libraries if the target
supports building shared libraries.
-
54aaae57
by Matthew Pickering at 2025-06-07T16:36:56+01:00
Hard-code ways in settings