From 3f9a9ad9f27bb6c82485cee964da4b05def00f78 Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Sun, 8 Jan 2023 04:31:14 -0800 Subject: [PATCH] llvmPackages_git.llvm: adjust a path, skip an xfail test on darwin Port of 0ee52512f0fd4f5b675ba9f742a300b50adf27d3 ("llvmPackages_15.llvm: adjust a path, skip an xfail test on darwin") --- pkgs/development/compilers/llvm/git/llvm/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix index d944ee949fd9c..4f0e68dc7b5f9 100644 --- a/pkgs/development/compilers/llvm/git/llvm/default.nix +++ b/pkgs/development/compilers/llvm/git/llvm/default.nix @@ -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 \