Skip to content
Snippets Groups Projects
Unverified Commit 8339ccac authored by Efraim Flashner's avatar Efraim Flashner
Browse files

gnu: python-faiss: Fix building on non-Intel architectures.

* gnu/packages/graph.scm (python-faiss)[arguments]: Adjust custom
'build-swig phase to change build flags for different archictures.
parent 3776dc09
No related branches found
No related tags found
No related merge requests found
...@@ -358,16 +358,15 @@ (define-public python-faiss ...@@ -358,16 +358,15 @@ (define-public python-faiss
(assoc-ref inputs "python*") python-version (assoc-ref inputs "python*") python-version
(assoc-ref inputs "python-numpy") python-version (assoc-ref inputs "python-numpy") python-version
python-version python-version
(cons "-mpopcnt" (list ,@(let ((system (or (%current-target-system)
(list ,@(let ((system (or (%current-target-system) (%current-system))))
(%current-system)))) (cond
(cond ((string-prefix? "x86_64" system)
((string-prefix? "x86_64" system) '("-mavx" "-msse2" "-mpopcnt"))
'("-mavx" "-msse2")) ((string-prefix? "i686" system)
((string-prefix? "i686" system) '("-msse2" "-mpopcnt"))
'("-msse2")) (else
(else '()))))))))
'())))))))))
(substitute* "Makefile" (substitute* "Makefile"
(("../libfaiss.a") "")) (("../libfaiss.a") ""))
(invoke "make" "cpu")))))) (invoke "make" "cpu"))))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment