llvmPackages_{12-19}.llvm: fix darwin build

build breaks after replace -> replace-fail
df8af496f7

pattern fails to match and doesn't seem to have a match in llvm-[12-]
https://github.com/llvm/llvm-project/blob/release/12.x/llvm/cmake/modules/AddLLVM.cmake
This commit is contained in:
Reno Dakota
2024-12-17 21:08:37 -08:00
parent ae079663c5
commit 71d262c2e0

View File

@@ -139,8 +139,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = optionalString stdenv.hostPlatform.isDarwin (''
substituteInPlace cmake/modules/AddLLVM.cmake \
--replace-fail 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
--replace-fail 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
--replace-fail 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"
'' +
# As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
# this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7