python3Packages.pythran: use LLVM openmp when using clang

This fixes pythran (and, therefore, also scipy, etc.) under Darwin
builds, which use LLVM by default.
This commit is contained in:
Luke Granger-Brown
2021-09-11 03:24:25 +00:00
parent 6da8f60683
commit 222c5477e2
2 changed files with 5 additions and 2 deletions
@@ -2,6 +2,7 @@
, python
, buildPythonPackage
, fetchFromGitHub
, openmp
, pytest-runner
, ply
, networkx
@@ -34,7 +35,7 @@ in buildPythonPackage rec {
# Hardcode path to mp library
(substituteAll {
src = ./0001-hardcode-path-to-libgomp.patch;
gomp = "${stdenv.cc.cc.lib}/lib/libgomp${stdenv.hostPlatform.extensions.sharedLibrary}";
gomp = "${if stdenv.cc.isClang then openmp else stdenv.cc.cc.lib}/lib/libgomp${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];