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 =
|
||||||
if stdenv.lib.versionAtLeast version "4.08"
|
let flags = new: old:
|
||||||
then [ "--x-libraries=${x11lib}" "--x-includes=${x11inc}"]
|
if stdenv.lib.versionAtLeast version "4.08"
|
||||||
else [ "-x11lib" x11lib "-x11include" x11inc ])
|
then new else old
|
||||||
++ optional flambdaSupport "-flambda"
|
; in
|
||||||
|
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