git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #123473 from stephank/fix-opencl-clang-darwin

opencl-clang: fix darwin build

commit1abb2283893e4e7f4a8bd7065acbe3d022403578 authorRobert Scott <code@humanleg.org.uk> dateWed 19 May 2021, 22:10 (5 years ago) parente9bfad85afd15a
1 file changed+7
pkgs/development/libraries/opencl-clang/default.nix+7
pkgs/development/libraries/opencl-clang/default.nix+7
@@ -76,6 +76,13 @@ let
7676 ./opencl-headers-dir.patch
7777 ];
7878
79+ # Uses linker flags that are not supported on Darwin.
80+ postPatch = lib.optionalString stdenv.isDarwin ''
81+ sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt
82+ substituteInPlace CMakeLists.txt \
83+ --replace '-Wl,--no-undefined' ""
84+ '';
85+
7986 nativeBuildInputs = [ cmake git llvm.dev ];
8087
8188 buildInputs = [ libclang llvm spirv-llvm-translator ];