Commit a1dd39f2 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add userWays and make sure all user-specific settings are used.

parent f500bd17
......@@ -31,4 +31,4 @@ packageRules =
forM_ [Stage0, Stage1] $ \stage -> do
forM_ allPackages $ \pkg -> do
let env = defaultEnvironment { getStage = stage, getPackage = pkg }
buildPackage env targetWays buildSettings
buildPackage env (targetWays <> userWays) (settings <> userSettings)
{-# LANGUAGE NoImplicitPrelude, FlexibleInstances #-}
module Settings (
buildSettings
settings
) where
import Base hiding (arg, args, Args)
......@@ -10,8 +10,8 @@ import Oracles.Builder
import Expression
import Expression.Settings
buildSettings :: Settings
buildSettings = do
settings :: Settings
settings = do
stage <- asks getStage
mconcat [ builder GhcCabal ? cabalSettings
, builder (GhcPkg stage) ? ghcPkgSettings ]
module UserSettings (
userSettings, userPackages
userSettings, userPackages, userWays
) where
import Base hiding (arg, args, Args)
import Oracles.Builder
import Ways
import Targets
import Expression
import Expression.Settings
-- No user-specific settings by default
userSettings :: Settings
userSettings = mconcat
userSettings = mempty
userPackages :: Packages
userPackages = mempty
userWays :: Ways
userWays = mempty
-- Examples:
userSettings' :: Settings
userSettings' = mconcat
[ package compiler ? stage Stage0 ? append ["foo", "bar"]
, builder (Ghc Stage0) ? remove ["-O2"]
, builder GhcCabal ? removeSub "--configure-option=CFLAGS" ["-Werror"] ]
userPackages :: Packages
userPackages = mconcat
userPackages' :: Packages
userPackages' = mconcat
[ stage Stage1 ? remove [cabal]
, remove [compiler] ]
userWays' :: Ways
userWays' = remove [profiling]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment