summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-07-01 11:42:11 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-07-01 11:42:11 +0000
commit76c520c095eb2b9d75fb66050b91097c787f5279 (patch)
tree4283324343becead1ac29c407b950ad816516cbb /mk
parentfae43d78c5f7fdcdd236e187d07d140b9ad4e07c (diff)
downloadhaskell-76c520c095eb2b9d75fb66050b91097c787f5279.tar.gz
make GhcProfiled work, and add a "prof" flavour to build.mk
Building a profiled GHC is as simple as adding GhcLibWays += p GhcProfiled = YES to your build.mk and saying 'make'. Then you have a profiled inplace/bin/ghc-stage2.
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk.sample24
1 files changed, 24 insertions, 0 deletions
diff --git a/mk/build.mk.sample b/mk/build.mk.sample
index c49fd03559..5b61d16f4b 100644
--- a/mk/build.mk.sample
+++ b/mk/build.mk.sample
@@ -16,6 +16,9 @@
# Fast build with optimised libraries:
#BuildFlavour = quick
+# Profile the stage2 compiler:
+#BuildFlavour = prof
+
# A development build, working on the stage 1 compiler:
#BuildFlavour = devel1
@@ -71,6 +74,27 @@ BUILD_DOCBOOK_PDF = NO
endif
+# -------- Profile the stage2 compiler ---------------------------------------
+
+ifeq "$(BuildFlavour)" "prof"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O -fasm
+GhcLibHcOpts = -O -fasm
+
+GhcLibWays += p
+GhcProfiled = YES
+
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+
# -------- A Development build (stage 1) -------------------------------------
ifeq "$(BuildFlavour)" "devel1"