OCaml: fix configure flags for flambda support
The configure program for OCaml has been using a new set of command-line arguments from version 4.08. This is a small refactoring to ease dealing with the two sets.
This commit is contained in:
parent
1491611bde
commit
9b76c5e17a
@ -41,11 +41,15 @@ stdenv.mkDerivation (args // {
|
|||||||
};
|
};
|
||||||
|
|
||||||
prefixKey = "-prefix ";
|
prefixKey = "-prefix ";
|
||||||
configureFlags = optionals useX11 (
|
configureFlags =
|
||||||
|
let flags = new: old:
|
||||||
if stdenv.lib.versionAtLeast version "4.08"
|
if stdenv.lib.versionAtLeast version "4.08"
|
||||||
then [ "--x-libraries=${x11lib}" "--x-includes=${x11inc}"]
|
then new else old
|
||||||
else [ "-x11lib" x11lib "-x11include" x11inc ])
|
; in
|
||||||
++ optional flambdaSupport "-flambda"
|
optionals useX11 (flags
|
||||||
|
[ "--x-libraries=${x11lib}" "--x-includes=${x11inc}"]
|
||||||
|
[ "-x11lib" x11lib "-x11include" x11inc ])
|
||||||
|
++ optional flambdaSupport (flags "--enable-flambda" "-flambda")
|
||||||
;
|
;
|
||||||
|
|
||||||
buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
|
buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
|
||||||
|
Loading…
Reference in New Issue
Block a user