Commit 3f9a9ad9 authored by Rahul Butani's avatar Rahul Butani Committed by Raito Bezarius
Browse files

llvmPackages_git.llvm: adjust a path, skip an xfail test on darwin

Port of 0ee52512 ("llvmPackages_15.llvm:
adjust a path, skip an xfail test on darwin")
parent 0da40725
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
, runCommand
, fetchpatch
, cmake
, darwin
, ninja
, python3
, libffi
@@ -144,6 +145,14 @@ in stdenv.mkDerivation (rec {
    substituteInPlace cmake/modules/AddLLVM.cmake \
      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
      --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
    # 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
    rm test/MC/ELF/cfi-version.ll

    # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
    # thus fails under the sandbox:
    substituteInPlace unittests/Support/Host.cpp \
      --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
  '' + ''
    # FileSystem permissions tests fail with various special bits
    substituteInPlace unittests/Support/CMakeLists.txt \