about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorRahul Butani <rrbutani@users.noreply.github.com>2023-01-08 04:31:14 -0800
committerRahul Butani <rrbutani@users.noreply.github.com>2023-01-27 13:29:22 -0800
commit0ee52512f0fd4f5b675ba9f742a300b50adf27d3 (patch)
treee971e196e7f9c2003dfa97eec0620ecf0d552e64 /pkgs/development/compilers
parentc7231c0b6d8e8a5dc622844780f3ed6f37b06692 (diff)
downloadnixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.tar
nixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.tar.gz
nixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.tar.bz2
nixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.tar.lz
nixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.tar.xz
nixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.tar.zst
nixlib-0ee52512f0fd4f5b675ba9f742a300b50adf27d3.zip
llvmPackages_15.llvm: adjust a path, skip an xfail test on darwin
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/llvm/15/llvm/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/15/llvm/default.nix b/pkgs/development/compilers/llvm/15/llvm/default.nix
index 3bf1ff7cb914..775270b29b63 100644
--- a/pkgs/development/compilers/llvm/15/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/15/llvm/default.nix
@@ -4,6 +4,7 @@
 , runCommand
 , fetchpatch
 , cmake
+, darwin
 , ninja
 , python3
 , libffi
@@ -143,6 +144,15 @@ 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 \