From: Ian Lynagh Date: Sat, 30 Aug 2008 16:16:37 +0000 (+0000) Subject: Fix building the GHC API with profiling X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=cdaa0b92ff96813b16fc351934d63080c05dece1 Fix building the GHC API with profiling --- diff --git a/compiler/Makefile b/compiler/Makefile index 026e54d..c511eeb 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 diff --git a/mk/config.mk.in b/mk/config.mk.in index 74589ae..944914e 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -241,6 +241,7 @@ GhcStage3HcOpts=-O2 GhcProfiled=NO GhcDebugged=NO +GhcLibProfiled=NO # Build shared and/or static libs? BuildSharedLibs=@BuildSharedLibs@