Merge pull request #139043 from obsidiansystems/dn-fix-lld_13

llvmPackages_13.lld: add postPatch to fix Darwin build
This commit is contained in:
John Ericson 2021-09-22 22:07:30 -04:00 committed by GitHub
commit 06f968ff54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,14 @@ stdenv.mkDerivation rec {
./gnu-install-dirs.patch
];
# On Darwin the llvm-config is perhaps not working fine as the
# LLVM_MAIN_SRC_DIR is not getting set correctly, and the build fails as the
# include path is not correct.
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace MachO/CMakeLists.txt --replace \
'(''${LLVM_MAIN_SRC_DIR}/' '(../'
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ libllvm libxml2 ];