mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
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 ";
|
||||
configureFlags = optionals useX11 (
|
||||
if stdenv.lib.versionAtLeast version "4.08"
|
||||
then [ "--x-libraries=${x11lib}" "--x-includes=${x11inc}"]
|
||||
else [ "-x11lib" x11lib "-x11include" x11inc ])
|
||||
++ optional flambdaSupport "-flambda"
|
||||
configureFlags =
|
||||
let flags = new: old:
|
||||
if stdenv.lib.versionAtLeast version "4.08"
|
||||
then new else old
|
||||
; 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";
|
||||
|
Loading…
Reference in New Issue
Block a user