mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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.
This commit is contained in:
parent
3776dc094c
commit
8339ccac5f
1 changed files with 9 additions and 10 deletions
|
@ -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"))
|
'("-mavx" "-msse2" "-mpopcnt"))
|
||||||
((string-prefix? "i686" system)
|
((string-prefix? "i686" system)
|
||||||
'("-msse2"))
|
'("-msse2" "-mpopcnt"))
|
||||||
(else
|
(else
|
||||||
'())))))))))
|
'()))))))))
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("../libfaiss.a") ""))
|
(("../libfaiss.a") ""))
|
||||||
(invoke "make" "cpu"))))))
|
(invoke "make" "cpu"))))))
|
||||||
|
|
Loading…
Reference in a new issue