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
|
@ -358,16 +358,15 @@ CPUFLAGS = ~{~a ~}~%"
|
|||
(assoc-ref inputs "python*") python-version
|
||||
(assoc-ref inputs "python-numpy") python-version
|
||||
python-version
|
||||
(cons "-mpopcnt"
|
||||
(list ,@(let ((system (or (%current-target-system)
|
||||
(%current-system))))
|
||||
(cond
|
||||
((string-prefix? "x86_64" system)
|
||||
'("-mavx" "-msse2"))
|
||||
((string-prefix? "i686" system)
|
||||
'("-msse2"))
|
||||
(else
|
||||
'())))))))))
|
||||
(list ,@(let ((system (or (%current-target-system)
|
||||
(%current-system))))
|
||||
(cond
|
||||
((string-prefix? "x86_64" system)
|
||||
'("-mavx" "-msse2" "-mpopcnt"))
|
||||
((string-prefix? "i686" system)
|
||||
'("-msse2" "-mpopcnt"))
|
||||
(else
|
||||
'()))))))))
|
||||
(substitute* "Makefile"
|
||||
(("../libfaiss.a") ""))
|
||||
(invoke "make" "cpu"))))))
|
||||
|
|
Loading…
Reference in New Issue