[Git][ghc/ghc][wip/hadrian-cross-stage2] 9 commits: Add missing req_interp modifier to T18441fail3 and T18441fail19

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri Dec 22 15:10:52 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC


Commits:
12bd1735 by Matthew Pickering at 2023-12-22T14:04:09+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.

- - - - -
2aa7ea0f by Matthew Pickering at 2023-12-22T14:51:49+00:00
Use explicit syntax rather than pure

- - - - -
34679d87 by Matthew Pickering at 2023-12-22T14:51:49+00:00
ci: Fail when bindist configure fails when installing bindist

It is better to fail earlier if the configure step fails rather than
carrying on for a more obscure error message.

- - - - -
e0fdeb4b by Matthew Pickering at 2023-12-22T14:53:02+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

- - - - -
fec155bc by Matthew Pickering at 2023-12-22T14:55:49+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).

- - - - -
d6933f41 by Matthew Pickering at 2023-12-22T15:01:50+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)

- - - - -
bdccba92 by Matthew Pickering at 2023-12-22T15:10:29+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)

-------------------------
Metric Decrease:
    T10421a
    T10858
    T11195
    T11276
    T11374
    T11822
    T15630
    T17096
    T18478
    T20261
Metric Increase:
    parsing001
-------------------------

- - - - -
b2e1a14b by Matthew Pickering at 2023-12-22T15:10:32+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.

- - - - -
c64ee583 by Matthew Pickering at 2023-12-22T15:10:32+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.

- - - - -


30 changed files:

- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- configure.ac
- distrib/configure.ac.in
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/cfg/default.host.target.in
- hadrian/src/Builder.hs
- hadrian/src/Context.hs
- hadrian/src/Expression.hs
- hadrian/src/Flavour.hs
- hadrian/src/Flavour/Type.hs
- hadrian/src/Hadrian/Expression.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/Libffi.hs
- hadrian/src/Rules/Library.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8619b604c7a864c6a2d378c9012b4cb0a41bae2f...c64ee583a7dcf0dbc4b273105396b440d545667c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8619b604c7a864c6a2d378c9012b4cb0a41bae2f...c64ee583a7dcf0dbc4b273105396b440d545667c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231222/5b1dcb47/attachment.html>


More information about the ghc-commits mailing list