Adds *-cross-ncg flavour.
authorMoritz Angermann <moritz.angermann@gmail.com>
Fri, 2 Mar 2018 21:15:09 +0000 (16:15 -0500)
committerBen Gamari <ben@smart-cactus.org>
Fri, 2 Mar 2018 21:15:23 +0000 (16:15 -0500)
Our *-cross flavours force -fllvm, this adds flavours for cross
compilation to x86_64, where we can use our native code generator.

Test Plan: ./validate

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4443

mk/build.mk.sample
mk/flavours/bench-cross-ncg.mk [new file with mode: 0644]
mk/flavours/perf-cross-ncg.mk [new file with mode: 0644]
mk/flavours/quick-cross-ncg.mk [new file with mode: 0644]

index 958cea7..ce7b4d6 100644 (file)
 # As above but build GHC using the LLVM backend
 #BuildFlavour = perf-llvm
 
-# Perf build configured for a cross-compiler
+# Perf build configured for a cross-compiler (using the LLVM backend)
 #BuildFlavour = perf-cross
 
+# Perf build configured for a cross-compiler (using the NCG backend)
+#BuildFlavour = perf-cross-ncg
+
 # Fast build with optimised libraries, no profiling (RECOMMENDED):
 #BuildFlavour = quick
 
 # Fast build with optimised libraries, no profiling, with LLVM:
 #BuildFlavour = quick-llvm
 
-# Fast build configured for a cross compiler
-#BuildFlavour  = quick-cross
+# Fast build configured for a cross compiler (using the LLVM backend)
+#BuildFlavour = quick-cross
+
+# Fast build configured for a cross compiler (using the NCG backend)
+#BuildFlavour = quick-cross-ncg
 
 # Even faster build.  NOT RECOMMENDED: the libraries will be
 # completely unoptimised, so any code built with this compiler
 # As above but build GHC using the LLVM backend
 #BuildFlavour = bench-llvm
 
-# Bench build configured for a cross-compiler
+# Bench build configured for a cross-compiler (using the LLVM backend)
 #BuildFlavour = bench-cross
 
+# Bench build configured for a cross-compiler (using the NCG backend)
+#BuildFlavour = bench-cross-ncg
+
 # Use the same settings as validate.
 #BuildFlavour = validate
 
diff --git a/mk/flavours/bench-cross-ncg.mk b/mk/flavours/bench-cross-ncg.mk
new file mode 100644 (file)
index 0000000..6b686af
--- /dev/null
@@ -0,0 +1,17 @@
+SRC_HC_OPTS        = -O -H64m
+GhcStage1HcOpts    = -O
+GhcStage2HcOpts    = -O0
+GhcLibHcOpts       = -O2
+BUILD_PROF_LIBS    = NO
+SplitObjs          = NO
+SplitSections      = NO
+HADDOCK_DOCS       = NO
+BUILD_SPHINX_HTML  = NO
+BUILD_SPHINX_PDF   = NO
+BUILD_MAN          = NO
+WITH_TERMINFO      = NO
+
+INTEGER_LIBRARY      = integer-simple
+Stage1Only           = YES
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/perf-cross-ncg.mk b/mk/flavours/perf-cross-ncg.mk
new file mode 100644 (file)
index 0000000..4b94c48
--- /dev/null
@@ -0,0 +1,16 @@
+SRC_HC_OPTS        = -O -H64m
+GhcStage1HcOpts    = -O2
+GhcStage2HcOpts    = -O2
+GhcLibHcOpts       = -O2
+BUILD_PROF_LIBS    = YES
+#SplitObjs
+HADDOCK_DOCS       = NO
+BUILD_SPHINX_HTML  = NO
+BUILD_SPHINX_PDF   = NO
+BUILD_MAN          = NO
+WITH_TERMINFO      = NO
+
+INTEGER_LIBRARY      = integer-simple
+Stage1Only           = YES
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/quick-cross-ncg.mk b/mk/flavours/quick-cross-ncg.mk
new file mode 100644 (file)
index 0000000..97352cc
--- /dev/null
@@ -0,0 +1,17 @@
+SRC_HC_OPTS        = -O0 -H64m
+GhcStage1HcOpts    = -O
+GhcStage2HcOpts    = -O0
+GhcLibHcOpts       = -O
+BUILD_PROF_LIBS    = NO
+SplitObjs          = NO
+SplitSections      = NO
+HADDOCK_DOCS       = NO
+BUILD_SPHINX_HTML  = NO
+BUILD_SPHINX_PDF   = NO
+BUILD_MAN          = NO
+WITH_TERMINFO      = NO
+
+INTEGER_LIBRARY      = integer-simple
+Stage1Only           = YES
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO