snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 37 forks source link

Fix defaut top level targets #659

Closed snowleopard closed 6 years ago

snowleopard commented 6 years ago

This does the following:

alpmestan commented 6 years ago

Does this mean cross-compilers don't get their ghc-tags (cross-compilers are stage 1 GHCs) anymore ?

snowleopard commented 6 years ago

@alpmestan According to this commit ghctags should be built with Stage2 compiler.

snowleopard commented 6 years ago

Also, this note seems relevant: Note [No stage2 packages when CrossCompiling or Stage1Only].

https://github.com/ghc/ghc/blob/3bdf0d01ff47977830ada30ce85f174098486e23/ghc.mk#L1499-L1546

alpmestan commented 6 years ago

Oh, nevermind then!

snowleopard commented 6 years ago

Actually, there is this bit:

# Here's why:
#  - first of all, ghc-stage1 can't use stage0's ghc library (it's too old)
#  - neither do we register the ghc library (compiler/stage1) that we build
#    with stage0. TODO Why not? We do build it...
#  - as a result, we need to a) use ghc-stage2 to build packages that depend on
#    the ghc library (e.g. ghctags [4]) and b) exclude those packages when
#    ghc-stage2 is not available.

See the TODO -- I believe now we do register the ghc library built in Stage0, so presumably this means we could indeed now build all its dependencies in Stage1. Let me create a separate issue to discuss this.

snowleopard commented 6 years ago

Here is the issue: #661.