Skip to content

DynFlags: don't store buildTag

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/dynflags/buildTag into master

DynFlags.buildTag was a field created from the set of Ways in DynFlags.ways. It had to be kept in sync with DynFlags.ways which was fragile. We want to avoid global state like this (#17957).

Moreover in #14335 we also want to support loading units with different ways: target units would still use DynFlags.ways but plugins would use GHC.Driver.Ways.hostFullWays. To avoid having to deal both with build tag and with ways, we recompute the buildTag on-the-fly (should be pretty cheap) and we remove DynFlags.buildTag field.

Merge request reports