@@ -25,6 +25,9 @@
2525 # platform). Static libs are always built.
2626 enableShared ? true
2727
28+, # What flavour to build. An empty string indicates no
29+ # specific flavour and falls back to ghc default values.
30+ ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
2831, # Whether to backport https://phabricator.haskell.org/D4388 for
2932 # deterministic profiling symbol names, at the cost of a slightly
3033 # non-standard GHC API
@@ -42,11 +45,14 @@ let
4245 "${targetPlatform.config}-";
4346
4447 buildMK = ''
48+ BuildFlavour = ${ghcFlavour}
49+ ifneq \"\$(BuildFlavour)\" \"\"
50+ include mk/flavours/\$(BuildFlavour).mk
51+ endif
4552 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
4653 '' + stdenv.lib.optionalString enableIntegerSimple ''
4754 INTEGER_LIBRARY = integer-simple
4855 '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
49− BuildFlavour = perf-cross
5056 Stage1Only = YES
5157 HADDOCK_DOCS = NO
5258 BUILD_SPHINX_HTML = NO