[Git][ghc/ghc][master] hadrian: remove redundant library/rts ways definitions from stock flavours
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 669d09f9 by Cheng Shao at 2026-03-13T15:06:07-04:00 hadrian: remove redundant library/rts ways definitions from stock flavours This patch removes redundant library/rts ways definitions from stock flavours in hadrian; they can be replaced by applying appropriate filters on `defaultFlavour`. - - - - - 5 changed files: - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs Changes: ===================================== hadrian/src/Settings/Flavours/Development.hs ===================================== @@ -1,21 +1,15 @@ module Settings.Flavours.Development (developmentFlavour) where -import qualified Data.Set as Set - import Expression import Flavour -import Oracles.Flag import Packages import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. developmentFlavour :: Stage -> Flavour -developmentFlavour ghcStage = defaultFlavour +developmentFlavour ghcStage = disableDynamicLibs $ disableProfiledLibs $ defaultFlavour { name = "devel" ++ stageString ghcStage , extraArgs = developmentArgs ghcStage <> defaultHaddockExtraArgs - , libraryWays = pure $ Set.fromList [vanilla] - , rtsWays = Set.fromList <$> mconcat [pure [vanilla, debug], targetSupportsThreadedRts ? pure [threaded, threadedDebug]] - , dynamicGhcPrograms = return False , ghcDebugAssertions = (== ghcStage) } where stageString Stage2 = "2" ===================================== hadrian/src/Settings/Flavours/GhcInGhci.hs ===================================== @@ -1,22 +1,14 @@ module Settings.Flavours.GhcInGhci (ghcInGhciFlavour) where -import qualified Data.Set as Set - import Expression import Flavour -import Oracles.Flag import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. ghcInGhciFlavour :: Flavour -ghcInGhciFlavour = defaultFlavour +ghcInGhciFlavour = disableProfiledLibs $ defaultFlavour { name = "ghc-in-ghci" , extraArgs = ghciArgs - -- We can't build DLLs on Windows (yet). Actually we should only - -- include the dynamic way when we have a dynamic host GHC, but just - -- checking for Windows seems simpler for now. - , libraryWays = pure (Set.fromList [vanilla]) <> pure (Set.fromList [ dynamic | not windowsHost ]) - , rtsWays = pure (Set.fromList [vanilla]) <> (targetSupportsThreadedRts ? pure (Set.fromList [threaded])) <> pure (Set.fromList [ dynamic | not windowsHost ]) } ghciArgs :: Args ===================================== hadrian/src/Settings/Flavours/Quick.hs ===================================== @@ -4,33 +4,16 @@ module Settings.Flavours.Quick ) where -import qualified Data.Set as Set - import Expression import Flavour -import Oracles.Flag import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. quickFlavour :: Flavour -quickFlavour = defaultFlavour +quickFlavour = disableProfiledLibs $ defaultFlavour { name = "quick" , extraArgs = quickArgs - , libraryWays = Set.fromList <$> - mconcat - [ pure [vanilla] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] - , rtsWays = Set.fromList <$> - mconcat - [ pure - [ vanilla, debug ] - , targetSupportsThreadedRts ? pure [ threaded, threadedDebug ] - , notStage0 ? platformSupportsSharedLibs ? pure - [ dynamic, debugDynamic ] - , notStage0 ? platformSupportsSharedLibs ? targetSupportsThreadedRts ? pure [ - threadedDynamic, threadedDebugDynamic - ] - ] } + } quickArgs :: Args quickArgs = sourceArgs SourceArgs ===================================== hadrian/src/Settings/Flavours/QuickCross.hs ===================================== @@ -1,33 +1,16 @@ module Settings.Flavours.QuickCross (quickCrossFlavour) where -import qualified Data.Set as Set - import Expression import Flavour -import Oracles.Flag import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. quickCrossFlavour :: Flavour -quickCrossFlavour = defaultFlavour +quickCrossFlavour = disableProfiledLibs $ defaultFlavour { name = "quick-cross" , extraArgs = quickCrossArgs , dynamicGhcPrograms = pure False - , libraryWays = Set.fromList <$> - mconcat - [ pure [vanilla] - , notStage0 ? platformSupportsSharedLibs ? pure [dynamic] ] - , rtsWays = Set.fromList <$> - mconcat - [ pure - [ vanilla, debug ] - , targetSupportsThreadedRts ? pure [threaded, threadedDebug] - , notStage0 ? platformSupportsSharedLibs ? pure - [ dynamic, debugDynamic ] - , notStage0 ? platformSupportsSharedLibs ? targetSupportsThreadedRts ? pure [ - threadedDynamic, threadedDebugDynamic - ] - ] } + } quickCrossArgs :: Args quickCrossArgs = sourceArgs SourceArgs ===================================== hadrian/src/Settings/Flavours/Quickest.hs ===================================== @@ -1,20 +1,15 @@ module Settings.Flavours.Quickest (quickestFlavour) where -import qualified Data.Set as Set - import Expression import Flavour -import Oracles.Flag import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. quickestFlavour :: Flavour -quickestFlavour = defaultFlavour +quickestFlavour = disableDynamicLibs $ disableProfiledLibs $ defaultFlavour { name = "quickest" , extraArgs = quickestArgs - , libraryWays = pure (Set.fromList [vanilla]) - , rtsWays = pure (Set.fromList [vanilla]) <> (targetSupportsThreadedRts ? pure (Set.fromList [threaded])) - , dynamicGhcPrograms = return False } + } quickestArgs :: Args quickestArgs = sourceArgs SourceArgs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/669d09f950a6e88b903d9fd8a7571531... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/669d09f950a6e88b903d9fd8a7571531... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)