rocksdb: support disabling building shared lib

This is needed to build `pkgsStatic.rocksdb`.
This commit is contained in:
Bas van Dijk 2020-10-18 15:52:20 +02:00
parent 93c5c61908
commit c6109efca6

View file

@ -9,6 +9,7 @@
, zlib
, zstd
, enableLite ? false
, enableShared ? true
}:
stdenv.mkDerivation rec {
@ -58,7 +59,7 @@ stdenv.mkDerivation rec {
"-DFORCE_SSE42=1")
(stdenv.lib.optional enableLite "-DROCKSDB_LITE=1")
"-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]"
hardeningDisable = stdenv.lib.optional stdenv.hostPlatform.isWindows "format";