From a04020b88d4935d675f989806aff251f459561e9 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Wed, 27 May 2020 19:12:58 +0200 Subject: DynFlags: don't store buildTag `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. --- compiler/GHC/HsToCore/Usage.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/GHC/HsToCore/Usage.hs') diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs index 567c84625e..0d9d8aabd6 100644 --- a/compiler/GHC/HsToCore/Usage.hs +++ b/compiler/GHC/HsToCore/Usage.hs @@ -186,7 +186,7 @@ mkPluginUsage hsc_env pluginModule if useDyn then libLocs else - let dflags' = updateWays (addWay' WayDyn dflags) + let dflags' = addWay' WayDyn dflags dlibLocs = [ searchPath mkHsSOName platform dlibLoc | searchPath <- searchPaths , dlibLoc <- packageHsLibs dflags' pkg -- cgit v1.2.1