arangodb: parameterize whether to enable asm optimizations

As far as I can tell, this can cause compile failures when building
the vendored abseil_cpp if choosing a target arch that does not
support sse. This might be possible to determine programmatically, but
it is more flexible to let the user decide.
This commit is contained in:
John Soo 2022-10-30 10:16:38 -07:00
parent f5bab1e083
commit ad424ad800
No known key found for this signature in database
GPG Key ID: D8A148F8CE4DDBC2

View File

@ -15,6 +15,7 @@
, lzo
, which
, targetArchitecture ? null
, asmOptimizations ? gcc10Stdenv.targetPlatform.isx86
}:
let
@ -65,6 +66,9 @@ gcc10Stdenv.mkDerivation rec {
# avoid reading /proc/cpuinfo for feature detection
"-DTARGET_ARCHITECTURE=${targetArch}"
] ++ lib.optionals asmOptimizations [
"-DASM_OPTIMIZATIONS=ON"
"-DHAVE_SSE42=${if gcc10Stdenv.targetPlatform.sse4_2Support then "ON" else "OFF"}"
];
meta = with lib; {