rules: add per-library EXTRA_HC_OPTS
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 25 May 2017 21:44:37 +0000 (22:44 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 25 May 2017 21:54:44 +0000 (22:54 +0100)
Sometimes it's handy to change a compiler flag
for a library in stage{0,1,2}.

Usage example:

    libraries/binary_EXTRA_HC_OPTS += -O1
    libraries/containers_EXTRA_HC_OPTS += -O1
    libraries/bytestring_EXTRA_HC_OPTS += -O1

Here override default -O2 defined in .cabal files
for these libraries to speed build up.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
rules/distdir-way-opts.mk

index c4d7168..eb4a5c4 100644 (file)
@@ -145,6 +145,7 @@ $1_$2_$3_MOST_HC_OPTS = \
  $$($1_$2_HC_OPTS) \
  $$(CONF_HC_OPTS_STAGE$4) \
  $$($1_$2_MORE_HC_OPTS) \
+ $$($1_EXTRA_HC_OPTS) \
  $$($1_$2_EXTRA_HC_OPTS) \
  $$($1_$2_$3_HC_OPTS) \
  $$($$(basename $$(subst ./,,$$<))_HC_OPTS) \