diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-27 19:12:58 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-27 11:57:11 -0400 |
commit | a04020b88d4935d675f989806aff251f459561e9 (patch) | |
tree | 716aa06689f45af4fa922d89024062df60d65423 /compiler/GHC/SysTools.hs | |
parent | a74ec37c9d7679a5563ab86a8759c79c3c5de6f0 (diff) | |
download | haskell-a04020b88d4935d675f989806aff251f459561e9.tar.gz |
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.
Diffstat (limited to 'compiler/GHC/SysTools.hs')
-rw-r--r-- | compiler/GHC/SysTools.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/SysTools.hs b/compiler/GHC/SysTools.hs index 24a3fefca9..ab83b3bf2a 100644 --- a/compiler/GHC/SysTools.hs +++ b/compiler/GHC/SysTools.hs @@ -239,10 +239,9 @@ linkDynLib dflags0 o_files dep_packages dflags1 = if platformMisc_ghcThreaded $ platformMisc dflags0 then addWay' WayThreaded dflags0 else dflags0 - dflags2 = if platformMisc_ghcDebugged $ platformMisc dflags1 + dflags = if platformMisc_ghcDebugged $ platformMisc dflags1 then addWay' WayDebug dflags1 else dflags1 - dflags = updateWays dflags2 verbFlags = getVerbFlags dflags o_file = outputFile dflags |