
#7841: Stage1Only conditional program/package building -------------------------------+-------------------------------------------- Reporter: elliottt | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: worksforme | Keywords: Stage1Only Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Comment(by igloo): Replying to [comment:3 elliottt]:
It looks like libraries/base_dist-install_NOT_NEEDED would prevent base from being built at all, instead of just with a specific stage of the compiler.
`base` is only built with one specific stage of the compiler. For packages that are built with multiple stages, the distdir is different for each one. e.g. `libraries/terminfo_dist-boot` is built with stage 0, and `libraries/terminfo_dist-install` with stage 1.
In the case where stage 2 doesn't get build, what causes the RTS to build, without all_rts being a dependency of all?
Nothing currently; I'll fix that.
I'm very interested in getting some version of Stage1Only working, and am happy to do the work to implement it. Could you give me a little guidance so that I can submit a better patch?
One way (untested) would probably be to add a check `ifneq "$(Stage1Only) $3" "YES 2"` before calling the helpers in `build-prog` and `build- package`, as well as defining `compiler_stage2_NOT_NEEDED=YES` and `ghc_stage2_NOT_NEEDED=YES`. An alternative would be to define lots of `_NOT_NEEDED` variables by iterating over `PACKAGE_STAGE2`. This would make the logic in the rules slightly simpler, but would probably be a little more verbose overall. I think the second would probably be slightly nicer on balance. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7841#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler