ghc: Handle flavors better
This commit is contained in:
parent
9ce15ea60c
commit
1978115c3b
@ -24,6 +24,10 @@
|
|||||||
, # Whether to build dynamic libs for the standard library (on the target
|
, # Whether to build dynamic libs for the standard library (on the target
|
||||||
# platform). Static libs are always built.
|
# platform). Static libs are always built.
|
||||||
enableShared ? true
|
enableShared ? true
|
||||||
|
|
||||||
|
, # What flavour to build. An empty string indicates no
|
||||||
|
# specific flavour and falls back to ghc default values.
|
||||||
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
@ -42,11 +46,14 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildMK = ''
|
buildMK = ''
|
||||||
|
BuildFlavour = ${ghcFlavour}
|
||||||
|
ifneq \"\$(BuildFlavour)\" \"\"
|
||||||
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||||
INTEGER_LIBRARY = integer-simple
|
INTEGER_LIBRARY = integer-simple
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
BuildFlavour = perf-cross
|
|
||||||
Stage1Only = YES
|
Stage1Only = YES
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
, # Whether to build dynamic libs for the standard library (on the target
|
, # Whether to build dynamic libs for the standard library (on the target
|
||||||
# platform). Static libs are always built.
|
# platform). Static libs are always built.
|
||||||
enableShared ? true
|
enableShared ? true
|
||||||
|
|
||||||
|
, # What flavour to build. An empty string indicates no
|
||||||
|
# specific flavour and falls back to ghc default values.
|
||||||
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
@ -36,11 +40,14 @@ let
|
|||||||
"${targetPlatform.config}-";
|
"${targetPlatform.config}-";
|
||||||
|
|
||||||
buildMK = ''
|
buildMK = ''
|
||||||
|
BuildFlavour = ${ghcFlavour}
|
||||||
|
ifneq \"\$(BuildFlavour)\" \"\"
|
||||||
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||||
INTEGER_LIBRARY = integer-simple
|
INTEGER_LIBRARY = integer-simple
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
BuildFlavour = perf-cross
|
|
||||||
Stage1Only = YES
|
Stage1Only = YES
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
# platform). Static libs are always built.
|
# platform). Static libs are always built.
|
||||||
enableShared ? true
|
enableShared ? true
|
||||||
|
|
||||||
|
, # What flavour to build. An empty string indicates no
|
||||||
|
# specific flavour and falls back to ghc default values.
|
||||||
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
, # Whether to backport https://phabricator.haskell.org/D4388 for
|
, # Whether to backport https://phabricator.haskell.org/D4388 for
|
||||||
# deterministic profiling symbol names, at the cost of a slightly
|
# deterministic profiling symbol names, at the cost of a slightly
|
||||||
# non-standard GHC API
|
# non-standard GHC API
|
||||||
@ -42,11 +45,14 @@ let
|
|||||||
"${targetPlatform.config}-";
|
"${targetPlatform.config}-";
|
||||||
|
|
||||||
buildMK = ''
|
buildMK = ''
|
||||||
|
BuildFlavour = ${ghcFlavour}
|
||||||
|
ifneq \"\$(BuildFlavour)\" \"\"
|
||||||
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||||
INTEGER_LIBRARY = integer-simple
|
INTEGER_LIBRARY = integer-simple
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
BuildFlavour = perf-cross
|
|
||||||
Stage1Only = YES
|
Stage1Only = YES
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
BUILD_SPHINX_HTML = NO
|
BUILD_SPHINX_HTML = NO
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
# platform). Static libs are always built.
|
# platform). Static libs are always built.
|
||||||
enableShared ? !targetPlatform.useAndroidPrebuilt
|
enableShared ? !targetPlatform.useAndroidPrebuilt
|
||||||
|
|
||||||
|
, # What flavour to build. An empty string indicates no
|
||||||
|
# specific flavour and falls back to ghc default values.
|
||||||
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
@ -37,11 +40,14 @@ let
|
|||||||
"${targetPlatform.config}-";
|
"${targetPlatform.config}-";
|
||||||
|
|
||||||
buildMK = ''
|
buildMK = ''
|
||||||
|
BuildFlavour = ${ghcFlavour}
|
||||||
|
ifneq \"\$(BuildFlavour)\" \"\"
|
||||||
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||||
INTEGER_LIBRARY = integer-simple
|
INTEGER_LIBRARY = integer-simple
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
BuildFlavour = perf-cross
|
|
||||||
Stage1Only = YES
|
Stage1Only = YES
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
BUILD_SPHINX_HTML = NO
|
BUILD_SPHINX_HTML = NO
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
enableShared ? !targetPlatform.useAndroidPrebuilt
|
enableShared ? !targetPlatform.useAndroidPrebuilt
|
||||||
|
|
||||||
, version ? "8.5.20180118"
|
, version ? "8.5.20180118"
|
||||||
|
, # What flavour to build. An empty string indicates no
|
||||||
|
# specific flavour and falls back to ghc default values.
|
||||||
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
@ -38,11 +41,14 @@ let
|
|||||||
"${targetPlatform.config}-";
|
"${targetPlatform.config}-";
|
||||||
|
|
||||||
buildMK = ''
|
buildMK = ''
|
||||||
|
BuildFlavour = ${ghcFlavour}
|
||||||
|
ifneq \"\$(BuildFlavour)\" \"\"
|
||||||
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
||||||
INTEGER_LIBRARY = integer-simple
|
INTEGER_LIBRARY = integer-simple
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
BuildFlavour = perf-cross
|
|
||||||
Stage1Only = YES
|
Stage1Only = YES
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
BUILD_SPHINX_HTML = NO
|
BUILD_SPHINX_HTML = NO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user