ocaml: add framePointer option
Signed-off-by: Ali Caglayan <alizter@gmail.com> <!-- ps-id: 10ea20a5-edc5-4358-a6d7-f2b5ec319258 -->
This commit is contained in:
parent
7b287d6f6e
commit
8f16a97848
1 changed files with 11 additions and 3 deletions
|
@ -12,6 +12,7 @@ in
|
|||
, flambdaSupport ? false
|
||||
, spaceTimeSupport ? false
|
||||
, unsafeStringSupport ? false
|
||||
, framePointerSupport ? false
|
||||
}:
|
||||
|
||||
assert useX11 -> safeX11 stdenv;
|
||||
|
@ -19,6 +20,7 @@ assert aflSupport -> lib.versionAtLeast version "4.05";
|
|||
assert flambdaSupport -> lib.versionAtLeast version "4.03";
|
||||
assert spaceTimeSupport -> lib.versionAtLeast version "4.04" && lib.versionOlder version "4.12";
|
||||
assert unsafeStringSupport -> lib.versionAtLeast version "4.06" && lib.versionOlder version "5.0";
|
||||
assert framePointerSupport -> lib.versionAtLeast version "4.01";
|
||||
|
||||
let
|
||||
src = args.src or (fetchurl {
|
||||
|
@ -29,8 +31,13 @@ in
|
|||
|
||||
let
|
||||
useNativeCompilers = !stdenv.isMips;
|
||||
inherit (lib) optional optionals optionalString;
|
||||
pname = "ocaml${optionalString aflSupport "+afl"}${optionalString spaceTimeSupport "+spacetime"}${optionalString flambdaSupport "+flambda"}";
|
||||
inherit (lib) optional optionals optionalString strings concatStrings;
|
||||
pname = concatStrings [ "ocaml"
|
||||
(optionalString aflSupport "+afl")
|
||||
(optionalString spaceTimeSupport "+spacetime")
|
||||
(optionalString flambdaSupport "+flambda")
|
||||
(optionalString framePointerSupport "+fp")
|
||||
];
|
||||
in
|
||||
|
||||
let
|
||||
|
@ -61,6 +68,7 @@ stdenv.mkDerivation (args // {
|
|||
++ optional aflSupport (flags "--with-afl" "-afl-instrument")
|
||||
++ optional flambdaSupport (flags "--enable-flambda" "-flambda")
|
||||
++ optional spaceTimeSupport (flags "--enable-spacetime" "-spacetime")
|
||||
++ optional framePointerSupport (flags "--enable-frame-pointers" "-with-frame-pointers")
|
||||
++ optionals unsafeStringSupport [
|
||||
"--disable-force-safe-string"
|
||||
"DEFAULT_STRING=unsafe"
|
||||
|
|
Loading…
Reference in a new issue