Merge pull request #100975 from basvandijk/rocksdb-optionally-disable-shared-lib

rocksdb: support disabling building shared lib
This commit is contained in:
Bas van Dijk 2020-10-19 10:44:16 +02:00 committed by GitHub
commit 5505f2ee38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@
, zlib , zlib
, zstd , zstd
, enableLite ? false , enableLite ? false
, enableShared ? true
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -58,7 +59,7 @@ stdenv.mkDerivation rec {
"-DFORCE_SSE42=1") "-DFORCE_SSE42=1")
(stdenv.lib.optional enableLite "-DROCKSDB_LITE=1") (stdenv.lib.optional enableLite "-DROCKSDB_LITE=1")
"-DFAIL_ON_WARNINGS=${if stdenv.hostPlatform.isMinGW then "NO" else "YES"}" "-DFAIL_ON_WARNINGS=${if stdenv.hostPlatform.isMinGW then "NO" else "YES"}"
]; ] ++ stdenv.lib.optional (!enableShared) "-DROCKSDB_BUILD_SHARED=0";
# otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]" # otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]"
hardeningDisable = stdenv.lib.optional stdenv.hostPlatform.isWindows "format"; hardeningDisable = stdenv.lib.optional stdenv.hostPlatform.isWindows "format";