summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Soo <john.soo@arista.com>2022-10-30 10:16:38 -0700
committerJohn Soo <john.soo@arista.com>2022-10-30 10:22:21 -0700
commitad424ad8007e7fecba3adfedfdc4f760c9d6951f (patch)
tree35c332e25ec56e643e5f7f2c0df009478419151d
parentf5bab1e08332366b4c80c5ab5f7d7f5e7d1a8d3e (diff)
downloadnixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.tar
nixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.tar.gz
nixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.tar.bz2
nixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.tar.lz
nixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.tar.xz
nixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.tar.zst
nixpkgs-ad424ad8007e7fecba3adfedfdc4f760c9d6951f.zip
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.
-rw-r--r--pkgs/servers/nosql/arangodb/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix
index c4498087da3..684f1b7a52c 100644
--- a/pkgs/servers/nosql/arangodb/default.nix
+++ b/pkgs/servers/nosql/arangodb/default.nix
@@ -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; {