[commit: ghc] wip/exceptions-note, wip/hadrian-import-packages, wip/splice-parsing, wip/trac-16270: Add O2 to hsCompiler on stage0 for most hadrian flavours. (1be81c5)

git at git.haskell.org git at git.haskell.org
Sat Feb 2 08:58:59 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branches: wip/exceptions-note,wip/hadrian-import-packages,wip/splice-parsing,wip/trac-16270
Link       : http://ghc.haskell.org/trac/ghc/changeset/1be81c50b51d0c9c651cbdd14bb7cf6884d011ff/ghc

>---------------------------------------------------------------

commit 1be81c50b51d0c9c651cbdd14bb7cf6884d011ff
Author: klebinger.andreas at gmx.at <klebinger.andreas at gmx.at>
Date:   Fri Jan 25 01:27:05 2019 +0100

    Add O2 to hsCompiler on stage0 for most hadrian flavours.


>---------------------------------------------------------------

1be81c50b51d0c9c651cbdd14bb7cf6884d011ff
 hadrian/doc/flavours.md                      | 9 ++++-----
 hadrian/src/Settings/Flavours/Development.hs | 3 ++-
 hadrian/src/Settings/Flavours/Performance.hs | 2 +-
 hadrian/src/Settings/Flavours/Profiled.hs    | 2 +-
 hadrian/src/Settings/Flavours/Quick.hs       | 2 +-
 hadrian/src/Settings/Flavours/QuickCross.hs  | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md
index f276dbb..cb864a0 100644
--- a/hadrian/doc/flavours.md
+++ b/hadrian/doc/flavours.md
@@ -50,8 +50,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
     <td>-O0<br>-H64m</td>
     <td></td>
     <td>-O</td>
+    <td>-O2</td>
     <td>-O</td>
-    <td></td>
     <td>-O</td>
     <td></td>
   </tr>
@@ -72,7 +72,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
     <td>-O<br>-H64m</td>
     <td></td>
     <td>-O2</td>
-    <td>-O</td>
+    <td>-O2</td>
     <td>-O2</td>
     <td>-O</td>
     <td>-O2</td>
@@ -83,8 +83,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
     <td>-O0<br>-H64m</td>
     <td></td>
     <td>-O</td>
-    <td>-O</td>
-    <td>-O</td>
+    <td>-O2</td>
     <td>-O</td>
     <td>-O</td>
   </tr>
@@ -105,7 +104,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
     <td>-O<br>-H64m</td>
     <td></td>
     <td>-dcore-lint</td>
-    <td></td>
+    <td>-O2</td>
     <td>-O0<br>-DDEBUG</td>
     <td></td>
     <td>-O0<br>-DDEBUG</td>
diff --git a/hadrian/src/Settings/Flavours/Development.hs b/hadrian/src/Settings/Flavours/Development.hs
index 9ad4b6b..5fcc88b 100644
--- a/hadrian/src/Settings/Flavours/Development.hs
+++ b/hadrian/src/Settings/Flavours/Development.hs
@@ -19,5 +19,6 @@ developmentArgs ghcStage = do
     sourceArgs SourceArgs
         { hsDefault  = pure ["-O", "-H64m"]
         , hsLibrary  = notStage0 ? arg "-dcore-lint"
-        , hsCompiler = succ stage == ghcStage ? pure ["-O0", "-DDEBUG"]
+        , hsCompiler = mconcat [stage0 ? arg "-O2",
+                                succ stage == ghcStage ? pure ["-O0", "-DDEBUG"]]
         , hsGhc      = succ stage == ghcStage ? pure ["-O0", "-DDEBUG"] }
diff --git a/hadrian/src/Settings/Flavours/Performance.hs b/hadrian/src/Settings/Flavours/Performance.hs
index 64ab4bc..aee5ddf 100644
--- a/hadrian/src/Settings/Flavours/Performance.hs
+++ b/hadrian/src/Settings/Flavours/Performance.hs
@@ -14,5 +14,5 @@ performanceArgs :: Args
 performanceArgs = sourceArgs SourceArgs
     { hsDefault  = pure ["-O", "-H64m"]
     , hsLibrary  = notStage0 ? arg "-O2"
-    , hsCompiler = mconcat [stage0 ? arg "-O", notStage0 ? arg "-O2"]
+    , hsCompiler = pure ["-O2"]
     , hsGhc      = mconcat [stage0 ? arg "-O", notStage0 ? arg "-O2"] }
diff --git a/hadrian/src/Settings/Flavours/Profiled.hs b/hadrian/src/Settings/Flavours/Profiled.hs
index 91b7f3b..4634a5a 100644
--- a/hadrian/src/Settings/Flavours/Profiled.hs
+++ b/hadrian/src/Settings/Flavours/Profiled.hs
@@ -19,5 +19,5 @@ profiledArgs = sourceArgs SourceArgs
         , naturalInBaseFixArgs
         ]
     , hsLibrary  = notStage0 ? arg "-O"
-    , hsCompiler = arg "-O"
+    , hsCompiler = mconcat [stage0 ? arg "-O2", notStage0 ? arg "-O"]
     , hsGhc      = arg "-O" }
diff --git a/hadrian/src/Settings/Flavours/Quick.hs b/hadrian/src/Settings/Flavours/Quick.hs
index 59b58eb..16ff99a 100644
--- a/hadrian/src/Settings/Flavours/Quick.hs
+++ b/hadrian/src/Settings/Flavours/Quick.hs
@@ -30,5 +30,5 @@ quickArgs = sourceArgs SourceArgs
         , naturalInBaseFixArgs
         ]
     , hsLibrary  = notStage0 ? arg "-O"
-    , hsCompiler =    stage0 ? arg "-O"
+    , hsCompiler =    stage0 ? arg "-O2"
     , hsGhc      =    stage0 ? arg "-O" }
diff --git a/hadrian/src/Settings/Flavours/QuickCross.hs b/hadrian/src/Settings/Flavours/QuickCross.hs
index 7572be2..3f2776e 100644
--- a/hadrian/src/Settings/Flavours/QuickCross.hs
+++ b/hadrian/src/Settings/Flavours/QuickCross.hs
@@ -31,7 +31,7 @@ quickCrossArgs = sourceArgs SourceArgs
         , naturalInBaseFixArgs
         ]
     , hsLibrary  = notStage0 ? mconcat [ arg "-O", arg "-fllvm" ]
-    , hsCompiler = stage0 ? arg "-O"
+    , hsCompiler = stage0 ? arg "-O2"
     , hsGhc      = mconcat
                    [ stage0 ? arg "-O"
                    , stage1 ? mconcat [ arg "-O0", arg "-fllvm" ] ] }



More information about the ghc-commits mailing list