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 39 forks source link

remove superfluous -fno-{ignore, omit}-interface-pragmas #675

Closed alpmestan closed 5 years ago

alpmestan commented 5 years ago

As suggested by @sighingnow in https://github.com/snowleopard/hadrian/pull/674#issuecomment-418656150. I ran the testsuite after I wrote this patch, and this doesn't affect anything.

alpmestan commented 5 years ago

Hmm, this does re-introduce the "can't use Natural in base" error when built with quickest (I forgot to try that, I've mostly been building perf-flavoured GHCs lately for the testsuite work).

Should we make this conditional on the flavour for now, until the underlying problem is solved in GHC land, if ever?

https://github.com/snowleopard/hadrian/blob/master/doc/flavours.md#arguments says we are likely to encounter this problem with quick, quickest and prof (since they build with -O0). Should emit those flags that this patch removes whenever the flavour is one of those? It's quite a hack, anyone's got a better idea?

snowleopard commented 5 years ago

Should we add the workarounds directly into flavour descriptions, e.g. here?

https://github.com/snowleopard/hadrian/blob/master/src/Settings/Flavours/Quickest.hs#L17

alpmestan commented 5 years ago

Yes, that would be nice!

We can still filter on the input file etc there, right? We could this way define the list of flags at the toplevel somewhere, with proper docs pointing to the trac ticket, and use that in all the relevant flavour definitions. That does sound better.

snowleopard commented 5 years ago

Yep, we can use all predicates there too.

alpmestan commented 5 years ago

OK, I'm closing this PR since the solution we're going for is "different enough" to justify a new one.

alpmestan commented 5 years ago

Better patch implementing the idea from above in https://github.com/snowleopard/hadrian/pull/676.