Right way to turn off dynamic linking in build.mk

Johan Tibell johan.tibell at gmail.com
Thu Dec 18 08:52:09 UTC 2014


Some times when I play around with GHC I'd like to turn off dynamic linking
to make GHC compile faster. I'm not sure what the right way to do this in
build.mk. It's made confusing by the conditional statements in that file:

    GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),v dyn,v)

This line make me worry that if I don't put

    DYNAMIC_GHC_PROGRAMS = NO

in the right place in build.mk it wont "take".

There's also this one:

    ifeq "$(PlatformSupportsSharedLibs)" "YES"
    GhcLibWays += dyn
    endif

Seeing this makes me wonder if

    DYNAMIC_GHC_PROGRAMS = NO
    DYNAMIC_BY_DEFAULT   = NO

is enough or if the build system still sniffs out the fact that my platform
supports dynamic linking.

Could someone please give an authoritative answer to how to turn off
dynamic linking?

-- Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141218/19da8066/attachment.html>


More information about the ghc-devs mailing list