on iko/ghcjs-patch-master help sign in
Minor adjustments
commited1dbc01f98411894f6613c62818f14b02fb6679 authorMoritz Angermann <moritz.angermann@gmail.com> dateSun 23 Dec 2018, 17:15 (8 years ago) parent980c276
1 file changed+9−6
builder/comp-builder.nix+9−6
builder/comp-builder.nix+9−6
@@ -20,6 +20,9 @@
2020, doCrossCheck ? component.doCrossCheck || false
2121, dontPatchELF ? true
2222, dontStrip ? true
23+
24+, static ? stdenv.hostPlatform.isMusl
25+, deadCodeElimination ? true
2326}:
2427
2528let
@@ -131,14 +134,14 @@ let
131134 "--with-ar=${stdenv.cc.bintools.targetPrefix}ar"
132135 "--with-strip=${stdenv.cc.bintools.targetPrefix}strip"
133136 # other flags
134− "--enable-static"
135− "--enable-split-sections"
136137 "--enable-executable-stripping"
137138 "--enable-library-stripping"
138− ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) (
139− map (arg: "--hsc2hs-option=" + arg) ["--cross-compile" "--via-asm"]
140− ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}"
141− ) ++ component.configureFlags
139+ ] ++ lib.optional (deadCodeElimination && stdenv.hostPlatform.isLinux) "--enable-split-sections"
140+ ++ lib.optional (static) "--enable-static"
141+ ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) (
142+ map (arg: "--hsc2hs-option=" + arg) ["--cross-compile" "--via-asm"]
143+ ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}" )
144+ ++ component.configureFlags
142145 );
143146
144147in stdenv.mkDerivation ({