Those flags were not actually passed to GHC before, but to Setup.hs.
They were introduced in #86948. The related twitch live stream uses the
build of git-annex as a measurement. I get the following numbers when
building git-annex with doCheck = false:
- for current master: 1:40 wall clock / 340s user
- without any -A64M argument: 1:40 wall clock / 340s user
- with this fix: 1:13 wall clock / 280s user
The idea was good, but the settings were never active.
More testing revealed that this seems to work on darwin just as well, so
we're removing the isLinux condition, too.
The following sequence of operations loses ghc-options:
Setup.hs configure --ghc-options
Setup.hs build --with-ghc=...
This is described in [1].
The fix is simple: Don't pass --with-ghc in the build phase. The values
are taken from the configure step anyway. This seems to have been
introduced all the way back in 64ec4dd87b
about 8 years ago for unknown reasons.
Resolves#286285
[1]: https://github.com/haskell/cabal/issues/10069
Fixes `cabal-install` to remove references to GHC, mostly through other
libraries that are included in the binary.
See: #304352
Co-authored-by: sternenseemann <sternenseemann@systemli.org>
It is somewhat curious that it behaves differently exclusively here, but
I don't think it is necessary to stop shipping a package due to floating
point arithmetic error—it would be unreasonable to assume there were
none…
See https://github.com/ekmett/ad/issues/113.
After 120f24202b, GHC_PACKAGE_PATH isn't
set implicitly in installPhase anymore. Instead we achieve the same by
telling the Makefile the exact ghc command line to use.
As a benefit, we can now cleanly separate build and host in this case:
We used to (implicitly) reuse the host package db. Now we can explicitly
request the package db also used for building Setup.hs.
This change ensures that packages won't be rebuild compared to before
the introduction of disallowedRequisites/disallowGhcReference unless
they use one of those arguments.
It may be nice to revert this in the future (via staging) for greater
simplicity, but will help with initial regression testing.
This makes `justStaticExecutables` error if the produced store path
contains references to GHC. This is almost always erroneous and due to
the generated `Paths_*` module being imported. This helps prevent
`justStaticExecutables` from producing binaries with closure sizes in
the gigabytes.
See: https://github.com/NixOS/nixpkgs/issues/164630
Co-authored-by: sternenseemann <sternenseemann@systemli.org>