git.iko.soy/typeable/nixpkgs
on master help sign in
opencl-clang: fix darwin build
commit5afd15a2affe2229585109b1a5f039d604d30467 authorStéphan Kochen <git@stephank.nl> dateTue 18 May 2021, 11:10 (5 years ago) parent42add18
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 ];