opencl-clang: fix darwin build

This commit is contained in:
Stéphan Kochen 2021-05-18 11:10:39 +02:00
parent 42add18071
commit 5afd15a2af

View file

@ -76,6 +76,13 @@ let
./opencl-headers-dir.patch
];
# Uses linker flags that are not supported on Darwin.
postPatch = lib.optionalString stdenv.isDarwin ''
sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt
substituteInPlace CMakeLists.txt \
--replace '-Wl,--no-undefined' ""
'';
nativeBuildInputs = [ cmake git llvm.dev ];
buildInputs = [ libclang llvm spirv-llvm-translator ];