summaryrefslogtreecommitdiff
path: root/compiler/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-08-30 16:16:37 +0000
committerIan Lynagh <igloo@earth.li>2008-08-30 16:16:37 +0000
commitcdaa0b92ff96813b16fc351934d63080c05dece1 (patch)
tree1e30f0caf872ce43f12e21f3b3c2fbc5925b1bf1 /compiler/Makefile
parent8ad1e840408392b97e7fa58ca9fcd036be2775f9 (diff)
downloadhaskell-cdaa0b92ff96813b16fc351934d63080c05dece1.tar.gz
Fix building the GHC API with profiling
Diffstat (limited to 'compiler/Makefile')
-rw-r--r--compiler/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/Makefile b/compiler/Makefile
index 026e54da66..c511eebcdf 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -160,6 +160,13 @@ COMMON_CONFIGURE_FLAGS += --ld-option=-Wl,--relax
endif
endif
+# We need to turn on profiling either if we have been asked to
+# (GhcLibProfiled = YES) or if we want GHC itself to be compiled with
+# profiling enabled (GhcProfiled = YES).
+ifneq "$(GhcLibProfiled) $(GhcProfiled)" "NO NO"
+CONFIGURE_FLAGS_STAGE2 += --enable-library-profiling
+endif
+
ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
# The #include is vital for the via-C route with older compilers, else the C
# compiler doesn't realise that the stcall foreign imports are indeed