Merge pull request #123473 from stephank/fix-opencl-clang-darwin

opencl-clang: fix darwin build
This commit is contained in:
Robert Scott 2021-05-19 22:10:42 +01:00 committed by GitHub
commit 1abb228389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 ];