[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL] 26 commits: drop deb9/10 from CI, add deb13
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC Commits: eca445e7 by mangoiv at 2026-03-07T05:02:36-05:00 drop deb9/10 from CI, add deb13 debian 9 and 10 are end of life, hence we drop them from our CI, but we do add debian 13. Jobs that were previously run on 9 and 10 run on 13, too, jobs that were run on 10, are run on 11 now. Jobs that were previously run on debian 12 are run on debian 13 now. This MR also updates hadrian's bootstrap plans for that reason. Metric Decrease: T9872d - - - - - 12f8b829 by Luite Stegeman at 2026-03-07T05:03:33-05:00 Fix GHC.Internal.Prim haddock Haddock used to parse Haskell source to generate documentation, but switched to using interface files instead. This broke documentation of the GHC.Internal.Prim module, since it's a wired-in interface that didn't provide a document structure. This patch adds the missing document structure and updates genprimopcode to make the section headers and descriptions available. fixes #26954 - - - - - f87e5e57 by Luite Stegeman at 2026-03-07T05:03:33-05:00 Remove obsolete --make-haskell-source from genprimopcode Now that haddock uses the wired-in interface for GHC.Internal.Prim, the generated Haskell source file is no longer needed. Remove the --make-haskell-source code generator from genprimopcode and replace the generated GHC/Internal/Prim.hs with a minimal static source file. - - - - - 4a7ddc7b by Sylvain Henry at 2026-03-07T05:04:59-05:00 JS: fix linking of exposed but non-preload units (#24886) Units exposed in the unit database but not explicitly passed on the command-line were not considered by the JS linker. This isn't an issue for cabal which passes every unit explicitly but it is an issue when using GHC directly (cf T24886 test). - - - - - 689aafcd by mangoiv at 2026-03-07T05:05:52-05:00 testsuite: double foundation timeout multiplier The runtime timeout in the foundation test was regularly hit by code generated by the wasm backend - we increase the timout since the high runtime is expected on the wasm backend for this rather complex test. Resolves #26938 - - - - - c01cb7ea by Matthew Pickering at 2026-03-07T10:11:05+00:00 Add missing req_interp modifier to T18441fail3 and T18441fail19 These tests require the interpreter but they were failing in a different way with the javascript backend because the interpreter was disabled and stderr is ignored by the test. - - - - - fa0a0279 by Matthew Pickering at 2026-03-07T10:11:05+00:00 Use explicit syntax rather than pure - - - - - c6550ff4 by Matthew Pickering at 2026-03-07T10:11:05+00:00 packaging: correctly propagate build/host/target to bindist configure script At the moment the host and target which we will produce a compiler for is fixed at the initial configure time. Therefore we need to persist the choice made at this time into the installation bindist as well so we look for the right tools, with the right prefixes at install time. In the future, we want to provide a bit more control about what kind of bindist we produce so the logic about what the host/target will have to be written by hadrian rather than persisted by the configure script. In particular with cross compilers we want to either build a normal stage 2 cross bindist or a stage 3 bindist, which creates a bindist which has a native compiler for the target platform. Fixes #21970 - - - - - 06e6ca10 by Matthew Pickering at 2026-03-07T10:11:05+00:00 hadrian: Fill in more of the default.host toolchain file When you are building a cross compiler this file will be used to build stage1 and it's libraries, so we need enough information here to work accurately. There is still more work to be done (see for example, word size is still fixed). - - - - - 743c46f7 by Matthew Pickering at 2026-03-07T10:11:05+00:00 hadrian: Disable docs when cross compiling Before there were a variety of ad-hoc places where doc building was disabled when cross compiling. * Some CI jobs sets --docs=none in gen_ci.hs * Some CI jobs set --docs=none in .gitlab/ci.sh * There was some logic in hadrian to not need the ["docs"] target when making a bindist. Now the situation is simple: * If you are cross compiling then defaultDocsTargets is empty by default. In theory, there is no reason why we can't build documentation for cross compiler bindists, but this is left to future work to generalise the documentation building rules to allow this (#24289) - - - - - 760cbf8b by Matthew Pickering at 2026-03-07T10:11:05+00: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) This commit also contains various changes to make stage2 compilers feasible. ------------------------- Metric Decrease: ManyAlternatives MultiComponentModulesRecomp MultiLayerModulesRecomp T10421 T12425 T12707 T13035 T13379 T15703 T16577 T18698a T18698b T18923 T1969 T21839c T3294 T4801 T5030 T5321Fun T5642 T783 T9198 T9872d T9961 parsing001 T5321FD T6048 T12227 T18140 T18282 T9233 T5631 T9630 ------------------------- Co-authored-by: Sven Tennie <sven.tennie@gmail.com> Fix rebase: settings-use-distro-mingw is now staged - - - - - 1ffa2285 by Matthew Pickering at 2026-03-07T10:11:05+00: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. - - - - - 7564eb87 by Matthew Pickering at 2026-03-07T10:12:58+00: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 - - - - - da2fd767 by Matthew Pickering at 2026-03-07T10:12:58+00: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 - - - - - 63acd7cd by Sven Tennie at 2026-03-07T10:14:54+00:00 ci: Increase timeout for emulators Test runs with emulators naturally take longer than on native machines. Generate jobs.yml - - - - - df0e6773 by Sven Tennie at 2026-03-07T10:14:55+00:00 ghc: Distinguish between having an interpreter and having an internal one Otherwise, we fail with warnings when compiling tools. Actually, these are related but different things: - ghc can run an interpreter (either internal or external) - ghc is compiled with an internal interpreter - - - - - bf10fbe4 by Matthew Pickering at 2026-03-07T10:14:55+00: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. Co-authored-by: Sven Tennie <sven.tennie@gmail.com> - - - - - 5d3a1e6a by Sven Tennie at 2026-03-07T10:14:55+00:00 Javascript skip T23697 See #22355 about how HSC2HS and the Javascript target don't play well together. - - - - - 2a227dc9 by Sven Tennie at 2026-03-07T10:14:55+00:00 Mark T24602 as fragile It was skipped before (due to CROSS_EMULATOR being set, which changed for JS), so we don't make things worse by marking it as fragile. - - - - - d4acb315 by Sven Tennie at 2026-03-07T10:14:55+00:00 Windows needs NM_STAGE0 as well The stage0 always needs nm. - - - - - 8611a26d by Sven Tennie at 2026-03-07T10:14:55+00:00 T17912 sometimes works for windows-validate This seems to be timing related. However, just simply increasing the timeout (sleep) statement of this test didn't help. Maybe, it has been flaky on CI before. - - - - - e62e2889 by Sven Tennie at 2026-03-07T10:14:55+00:00 stripping: Not for >= Stage2 cross-compiled Currently, we can only strip objects of the host target. - - - - - eb74274e by Sven Tennie at 2026-03-07T10:14:55+00:00 hadrian: Improve readability of inTreeCompilerArgs Refer to the stages of executables and libraries. This should express the intention better. - - - - - 0847a12b by Sven Tennie at 2026-03-07T10:14:55+00:00 hadrian: Fix difference between in-tree and out-of-tree GHC test args Done by canonicalizing the package database path. (The issue was a not fully reduced path.) - - - - - 1a44e57a by Sven Tennie at 2026-03-07T10:14:55+00:00 Add a config flag for LibDir and derived values For cross-compilers, we have to refer to the libs of the succeeding stage. This also affects other files previously relying on top_dir in GHC. - - - - - 0ccee36a by Sven Tennie at 2026-03-07T10:19:43+00:00 Rebase fixup - - - - - 114 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - compiler/GHC/Builtin/PrimOps.hs - compiler/GHC/Builtin/Utils.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/Driver/Config/Interpreter.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Runtime/Interpreter/JS.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - configure.ac - distrib/configure.ac.in - ghc/GHC/Driver/Session/Mode.hs - ghc/GHCi/UI.hs - ghc/Main.hs - ghc/ghc-bin.cabal.in - hadrian/README.md - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/bootstrap/generate_bootstrap_plans - hadrian/bootstrap/plan-9_10_1.json - hadrian/bootstrap/plan-9_10_2.json - + hadrian/bootstrap/plan-9_10_3.json - hadrian/bootstrap/plan-bootstrap-9_10_1.json - hadrian/bootstrap/plan-bootstrap-9_10_2.json - + hadrian/bootstrap/plan-bootstrap-9_10_3.json - hadrian/cfg/default.host.target.in - + hadrian/cfg/system.config.host.in - hadrian/cfg/system.config.in - + hadrian/cfg/system.config.target.in - hadrian/hadrian.cabal - hadrian/src/Base.hs - + hadrian/src/BindistConfig.hs - hadrian/src/Builder.hs - hadrian/src/Context.hs - hadrian/src/Expression.hs - hadrian/src/Flavour.hs - hadrian/src/Flavour/Type.hs - hadrian/src/Hadrian/Builder.hs - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Hadrian/Haskell/Hash.hs - hadrian/src/Hadrian/Oracles/TextFile.hs - hadrian/src/Oracles/Flag.hs - hadrian/src/Oracles/Flavour.hs - hadrian/src/Oracles/Setting.hs - hadrian/src/Oracles/TestSettings.hs - hadrian/src/Packages.hs - hadrian/src/Rules.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Compile.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Rules/Gmp.hs - hadrian/src/Rules/Library.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Common.hs - hadrian/src/Settings/Builders/Configure.hs - hadrian/src/Settings/Builders/DeriveConstants.hs - hadrian/src/Settings/Builders/GenPrimopCode.hs - hadrian/src/Settings/Builders/Ghc.hs - hadrian/src/Settings/Builders/Hsc2Hs.hs - hadrian/src/Settings/Builders/RunTest.hs - hadrian/src/Settings/Builders/SplitSections.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - hadrian/src/Settings/Program.hs - hadrian/src/Settings/Warnings.hs - libraries/base/tests/IO/all.T - libraries/base/tests/all.T - libraries/ghc-internal/ghc-internal.cabal.in - + libraries/ghc-internal/src/GHC/Internal/Prim.hs - m4/fp_find_nm.m4 - m4/fptools_set_platform_vars.m4 - m4/prep_target_file.m4 - testsuite/driver/perf_notes.py - testsuite/ghc-config/ghc-config.hs - testsuite/tests/ghc-e/should_fail/all.T - testsuite/tests/ghci/should_run/all.T - + testsuite/tests/javascript/T24886.hs - + testsuite/tests/javascript/T24886.stderr - + testsuite/tests/javascript/T24886.stdout - testsuite/tests/javascript/all.T - testsuite/tests/javascript/closure/all.T - testsuite/tests/numeric/should_run/all.T - testsuite/tests/overloadedrecflds/should_compile/all.T - testsuite/tests/overloadedrecflds/should_run/all.T - testsuite/tests/pmcheck/should_compile/T11303.hs - testsuite/tests/quasiquotation/qq005/test.T - testsuite/tests/quasiquotation/qq006/test.T - testsuite/tests/saks/should_compile/all.T - testsuite/tests/showIface/all.T - testsuite/tests/th/all.T - testsuite/tests/vdq-rta/should_compile/all.T - utils/genprimopcode/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/74d7c70e3b357ea57ba51527544497a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/74d7c70e3b357ea57ba51527544497a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)