[commit: ghc] wip/nfs-locking: First step towards #60. (3e2cdc9)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:19:37 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/3e2cdc9ff449c85d96de67238835e0159b5b3724/ghc
>---------------------------------------------------------------
commit 3e2cdc9ff449c85d96de67238835e0159b5b3724
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Mon Dec 28 15:58:06 2015 +0000
First step towards #60.
>---------------------------------------------------------------
3e2cdc9ff449c85d96de67238835e0159b5b3724
src/Settings/Args.hs | 13 ++++++++-----
src/Settings/Builders/Alex.hs | 11 +----------
src/Settings/Packages/Compiler.hs | 9 +++++++++
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/src/Settings/Args.hs b/src/Settings/Args.hs
index 8aa0268..6715680 100644
--- a/src/Settings/Args.hs
+++ b/src/Settings/Args.hs
@@ -16,21 +16,20 @@ import Settings.Builders.Happy
import Settings.Builders.Hsc2Hs
import Settings.Builders.HsCpp
import Settings.Builders.Ld
+import Settings.Packages.Compiler
import Settings.User
getArgs :: Expr [String]
-getArgs = fromDiffExpr $ defaultArgs <> userArgs
+getArgs = fromDiffExpr $ defaultBuilderArgs <> defaultPackageArgs <> userArgs
--- TODO: add all other settings
-- TODO: add src-hc-args = -H32m -O
-- TODO: GhcStage2HcOpts=-O2 unless GhcUnregisterised
-- TODO: compiler/stage1/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas
-- TODO: compiler/main/GhcMake_HC_OPTS += -auto-all
--- TODO: compiler_stage2_HADDOCK_OPTS += --optghc=-DSTAGE=2
-- TODO: compiler/prelude/PrimOp_HC_OPTS += -fforce-recomp
-- TODO: is GhcHcOpts=-Rghc-timing needed?
-defaultArgs :: Args
-defaultArgs = mconcat
+defaultBuilderArgs :: Args
+defaultBuilderArgs = mconcat
[ alexArgs
, arArgs
, cabalArgs
@@ -48,3 +47,7 @@ defaultArgs = mconcat
, hsc2HsArgs
, hsCppArgs
, ldArgs ]
+
+defaultPackageArgs :: Args
+defaultPackageArgs = mconcat
+ [ compilerArgs ]
diff --git a/src/Settings/Builders/Alex.hs b/src/Settings/Builders/Alex.hs
index 239ae85..086bf1b 100644
--- a/src/Settings/Builders/Alex.hs
+++ b/src/Settings/Builders/Alex.hs
@@ -1,18 +1,9 @@
module Settings.Builders.Alex (alexArgs) where
import Expression
-import GHC (compiler)
-import Predicates (builder, package)
+import Predicates (builder)
alexArgs :: Args
alexArgs = builder Alex ? mconcat [ arg "-g"
- , package compiler ? arg "--latin1"
, arg =<< getInput
, arg "-o", arg =<< getOutput ]
-
--- TODO: separate arguments into builder-specific and package-specific
--- compilierArgs = package compiler ? builder Alex ? arg "awe"
-
--- args = mconcat
--- [ alexArgs
--- , compilerArgs ]
diff --git a/src/Settings/Packages/Compiler.hs b/src/Settings/Packages/Compiler.hs
new file mode 100644
index 0000000..2ade082
--- /dev/null
+++ b/src/Settings/Packages/Compiler.hs
@@ -0,0 +1,9 @@
+module Settings.Packages.Compiler (compilerArgs) where
+
+import Expression
+import GHC (compiler)
+import Predicates (builder, package)
+
+compilerArgs :: Args
+compilerArgs = package compiler ?
+ mconcat [ builder Alex ? arg "--latin1" ]
More information about the ghc-commits
mailing list