[commit: ghc] wip/wildcards-warn: Hadrian: add LLVM flavours (b1662e8)
git at git.haskell.org
git at git.haskell.org
Tue Feb 12 07:00:56 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/wildcards-warn
Link : http://ghc.haskell.org/trac/ghc/changeset/b1662e812c09b8b7c41b90415eecb0c7f215a09b/ghc
>---------------------------------------------------------------
commit b1662e812c09b8b7c41b90415eecb0c7f215a09b
Author: Alec Theriault <alec.theriault at gmail.com>
Date: Tue Jan 29 18:33:20 2019 -0800
Hadrian: add LLVM flavours
This adds a handful of LLVM flavours and the accompanying
documentation. These flavours are mostly uninteresting, but
exist in the Make system.
>---------------------------------------------------------------
b1662e812c09b8b7c41b90415eecb0c7f215a09b
hadrian/doc/flavours.md | 37 +++++++++++++++++++++++++++++++++--
hadrian/hadrian.cabal | 1 +
hadrian/src/Settings.hs | 4 +++-
hadrian/src/Settings/Flavours/Llvm.hs | 26 ++++++++++++++++++++++++
4 files changed, 65 insertions(+), 3 deletions(-)
diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md
index cb864a0..7b89637 100644
--- a/hadrian/doc/flavours.md
+++ b/hadrian/doc/flavours.md
@@ -109,6 +109,39 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<td></td>
<td>-O0<br>-DDEBUG</td>
</tr>
+ <tr>
+ <th>quick-llvm</td>
+ <td>-O0<br>-H64m<br>-fllvm</td>
+ <td>-O0<br>-H64m<br>-fllvm</td>
+ <td></td>
+ <td>-O</td>
+ <td>-O</td>
+ <td></td>
+ <td>-O</td>
+ <td></td>
+ </tr>
+ <tr>
+ <th>perf-llvm</td>
+ <td>-O<br>-H64m<br>-fllvm</td>
+ <td>-O<br>-H64m<br>-fllvm</td>
+ <td></td>
+ <td>-O2</td>
+ <td>-O</td>
+ <td>-O2</td>
+ <td>-O</td>
+ <td>-O2</td>
+ </tr>
+ <tr>
+ <th>prof-llvm</td>
+ <td>-O0<br>-H64m<br>-fllvm</td>
+ <td>-O0<br>-H64m<br>-fllvm</td>
+ <td></td>
+ <td>-O</td>
+ <td>-O</td>
+ <td>-O</td>
+ <td>-O</td>
+ <td>-O</td>
+ </tr>
</table>
## Ways
@@ -132,7 +165,7 @@ information. The following table lists ways that are built in different flavours
<th>stage1+</th>
</tr>
<tr>
- <th>default<br>perf<br>prof<br>devel1<br>devel2</td>
+ <th>default<br>perf<br>prof<br>devel1<br>devel2<br>perf-llvm<br>prof-llvm</td>
<td>vanilla</td>
<td>vanilla<br>profiling<br>dynamic</td>
<td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
@@ -149,7 +182,7 @@ information. The following table lists ways that are built in different flavours
<td>Only in<br>prof<br>flavour</td>
</tr>
<tr>
- <th>quick</th>
+ <th>quick<br>quick-llvm</th>
<td>vanilla</td>
<td>vanilla<br>dynamic</td>
<td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal
index 669d16c..6a4fff1 100644
--- a/hadrian/hadrian.cabal
+++ b/hadrian/hadrian.cabal
@@ -91,6 +91,7 @@ executable hadrian
, Settings.Default
, Settings.Flavours.Common
, Settings.Flavours.Development
+ , Settings.Flavours.Llvm
, Settings.Flavours.Performance
, Settings.Flavours.Profiled
, Settings.Flavours.Quick
diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs
index 99a58db..519d1fc 100755
--- a/hadrian/src/Settings.hs
+++ b/hadrian/src/Settings.hs
@@ -12,6 +12,7 @@ import UserSettings (userFlavours, userPackages, userDefaultFlavour)
import {-# SOURCE #-} Settings.Default
import Settings.Flavours.Development
+import Settings.Flavours.Llvm
import Settings.Flavours.Performance
import Settings.Flavours.Profiled
import Settings.Flavours.Quick
@@ -36,7 +37,8 @@ hadrianFlavours :: [Flavour]
hadrianFlavours =
[ defaultFlavour, developmentFlavour Stage1, developmentFlavour Stage2
, performanceFlavour, profiledFlavour, quickFlavour, quickestFlavour
- , quickCrossFlavour ]
+ , quickCrossFlavour
+ , performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour ]
flavour :: Action Flavour
flavour = do
diff --git a/hadrian/src/Settings/Flavours/Llvm.hs b/hadrian/src/Settings/Flavours/Llvm.hs
new file mode 100644
index 0000000..2752c9e
--- /dev/null
+++ b/hadrian/src/Settings/Flavours/Llvm.hs
@@ -0,0 +1,26 @@
+module Settings.Flavours.Llvm (
+ performanceLlvmFlavour,
+ profiledLlvmFlavour,
+ quickLlvmFlavour,
+) where
+
+import Expression
+import Flavour
+
+import Settings.Flavours.Performance
+import Settings.Flavours.Profiled
+import Settings.Flavours.Quick
+
+-- Please update doc/flavours.md when changing this file.
+performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour :: Flavour
+performanceLlvmFlavour = mkLlvmFlavour performanceFlavour
+profiledLlvmFlavour = mkLlvmFlavour profiledFlavour
+quickLlvmFlavour = mkLlvmFlavour quickFlavour
+
+-- | Turn a flavour into an LLVM flavour
+mkLlvmFlavour :: Flavour -> Flavour
+mkLlvmFlavour flav = flav
+ { name = name flav ++ "-llvm"
+ , args = mconcat [ args flav
+ , builder Ghc ? arg "-fllvm" ]
+ }
More information about the ghc-commits
mailing list