mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 19:44:09 +00:00
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:
parent
f5bab1e083
commit
ad424ad800
@ -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; {
|
||||
|
Loading…
Reference in New Issue
Block a user