summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2018-03-02 16:15:09 -0500
committerBen Gamari <ben@smart-cactus.org>2018-03-02 16:15:23 -0500
commite4dcebf899c796a13dabf8964038f78505b9f4ec (patch)
treee5e25694e9cf6833e106a6aeff37c43f5fa083ed /mk
parent7782b47c4193975123edd3af630e6fe59ac7ef73 (diff)
downloadhaskell-e4dcebf899c796a13dabf8964038f78505b9f4ec.tar.gz
Adds *-cross-ncg flavour.
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
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk.sample17
-rw-r--r--mk/flavours/bench-cross-ncg.mk17
-rw-r--r--mk/flavours/perf-cross-ncg.mk16
-rw-r--r--mk/flavours/quick-cross-ncg.mk17
4 files changed, 63 insertions, 4 deletions
diff --git a/mk/build.mk.sample b/mk/build.mk.sample
index 958cea72a3..ce7b4d65bf 100644
--- a/mk/build.mk.sample
+++ b/mk/build.mk.sample
@@ -13,17 +13,23 @@
# 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
@@ -51,9 +57,12 @@
# 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
index 0000000000..6b686af5c4
--- /dev/null
+++ b/mk/flavours/bench-cross-ncg.mk
@@ -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
index 0000000000..4b94c48805
--- /dev/null
+++ b/mk/flavours/perf-cross-ncg.mk
@@ -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
index 0000000000..97352ccd3e
--- /dev/null
+++ b/mk/flavours/quick-cross-ncg.mk
@@ -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