mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-03 17:33:26 +03:00
ocaml: add unsafe string support
This commit is contained in:
parent
551ee766e8
commit
64a4e05f0d
@ -11,12 +11,14 @@ in
|
|||||||
, aflSupport ? false
|
, aflSupport ? false
|
||||||
, flambdaSupport ? false
|
, flambdaSupport ? false
|
||||||
, spaceTimeSupport ? false
|
, spaceTimeSupport ? false
|
||||||
|
, unsafeStringSupport ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert useX11 -> safeX11 stdenv;
|
assert useX11 -> safeX11 stdenv;
|
||||||
assert aflSupport -> lib.versionAtLeast version "4.05";
|
assert aflSupport -> lib.versionAtLeast version "4.05";
|
||||||
assert flambdaSupport -> lib.versionAtLeast version "4.03";
|
assert flambdaSupport -> lib.versionAtLeast version "4.03";
|
||||||
assert spaceTimeSupport -> lib.versionAtLeast version "4.04";
|
assert spaceTimeSupport -> lib.versionAtLeast version "4.04";
|
||||||
|
assert unsafeStringSupport -> lib.versionAtLeast version "4.06" && lib.versionOlder version "5.0";
|
||||||
|
|
||||||
let
|
let
|
||||||
src = args.src or (fetchurl {
|
src = args.src or (fetchurl {
|
||||||
@ -59,6 +61,10 @@ stdenv.mkDerivation (args // {
|
|||||||
++ optional aflSupport (flags "--with-afl" "-afl-instrument")
|
++ optional aflSupport (flags "--with-afl" "-afl-instrument")
|
||||||
++ optional flambdaSupport (flags "--enable-flambda" "-flambda")
|
++ optional flambdaSupport (flags "--enable-flambda" "-flambda")
|
||||||
++ optional spaceTimeSupport (flags "--enable-spacetime" "-spacetime")
|
++ optional spaceTimeSupport (flags "--enable-spacetime" "-spacetime")
|
||||||
|
++ optionals unsafeStringSupport [
|
||||||
|
"--disable-force-safe-string"
|
||||||
|
"DEFAULT_STRING=unsafe"
|
||||||
|
]
|
||||||
++ optional (stdenv.hostPlatform.isStatic && (lib.versionOlder version "4.08")) "-no-shared-libs"
|
++ optional (stdenv.hostPlatform.isStatic && (lib.versionOlder version "4.08")) "-no-shared-libs"
|
||||||
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && lib.versionOlder version "4.08") [
|
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && lib.versionOlder version "4.08") [
|
||||||
"-host ${stdenv.hostPlatform.config}"
|
"-host ${stdenv.hostPlatform.config}"
|
||||||
|
Loading…
Reference in New Issue
Block a user