Skip to content

Instantly share code, notes, and snippets.

@Artturin
Last active November 25, 2023 21:55
Show Gist options
  • Save Artturin/c39265ecaeea523cd7224fc7b7632371 to your computer and use it in GitHub Desktop.
Save Artturin/c39265ecaeea523cd7224fc7b7632371 to your computer and use it in GitHub Desktop.
--- pkgs/development/compilers/llvm/git
+++ pkgs/development/compilers/llvm/15
├── stat {}
│ @@ -1,7 +1,7 @@
│ Size: 12 Blocks: 17 IO Block: 1024 directory
│ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ -Modify: 2023-11-25 01:05:56.906077445 +0000
│ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ --- pkgs/development/compilers/llvm/git/clang
├── +++ pkgs/development/compilers/llvm/15/clang
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 5 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-24 23:54:24.396653571 +0000
│ │ -Modify: 2023-11-24 23:54:24.472652630 +0000
│ │ --- pkgs/development/compilers/llvm/git/clang/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/clang/default.nix
│ │ @@ -77,21 +77,20 @@
│ │ # Move libclang to 'lib' output
│ │ moveToOutput "lib/libclang.*" "$lib"
│ │ moveToOutput "lib/libclang-cpp.*" "$lib"
│ │ substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
│ │ --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
│ │ --replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
│ │
│ │ + mkdir -p $python/bin $python/share/clang/
│ │ - mkdir -p $python/bin $python/share/{clang,scan-view}
│ │ mv $out/bin/{git-clang-format,scan-view} $python/bin
│ │ if [ -e $out/bin/set-xcode-analyzer ]; then
│ │ mv $out/bin/set-xcode-analyzer $python/bin
│ │ fi
│ │ mv $out/share/clang/*.py $python/share/clang
│ │ - mv $out/share/scan-view/*.py $python/share/scan-view
│ │ rm $out/bin/c-index-test
│ │ patchShebangs $python/bin
│ │
│ │ mkdir -p $dev/bin
│ │ cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
│ │ '';
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 4855 Blocks: 9 IO Block: 5120 regular file
│ │ │ - Size: 4925 Blocks: 9 IO Block: 5120 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 23:54:24.396653571 +0000
│ │ │ -Modify: 2023-11-24 23:54:24.472652630 +0000
│ │ --- pkgs/development/compilers/llvm/git/clang/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/clang/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 5003 Blocks: 9 IO Block: 5120 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.406431599 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ │ --- pkgs/development/compilers/llvm/git/clang/purity.patch
│ ├── +++ pkgs/development/compilers/llvm/15/clang/purity.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 994 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.406431599 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 5 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-24 23:54:24.472652630 +0000
│ │ +Modify: 2023-11-24 23:54:24.396653571 +0000
│ --- pkgs/development/compilers/llvm/git/compiler-rt
├── +++ pkgs/development/compilers/llvm/15/compiler-rt
│ ├── file list
│ │ @@ -1,6 +1,5 @@
│ │ X86-support-extension.patch
│ │ -codesign.patch
│ │ darwin-targetconditionals.patch
│ │ default.nix
│ │ gnu-install-dirs.patch
│ │ normalize-var.patch
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ + Size: 7 Blocks: 17 IO Block: 512 directory
│ │ - Size: 8 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-25 01:05:56.898077418 +0000
│ │ -Modify: 2023-11-24 23:54:24.469652668 +0000
│ │ --- pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch
│ ├── +++ pkgs/development/compilers/llvm/15/compiler-rt/X86-support-extension.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 683 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.406431599 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ │ --- pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch
│ ├── +++ pkgs/development/compilers/llvm/15/compiler-rt/darwin-targetconditionals.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1948 Blocks: 9 IO Block: 2048 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ │ --- pkgs/development/compilers/llvm/git/compiler-rt/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/compiler-rt/default.nix
│ │ @@ -60,23 +60,20 @@
│ │ "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
│ │ ] ++ lib.optionals (bareMetal) [
│ │ "-DCOMPILER_RT_OS_DIR=baremetal"
│ │ ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
│ │ "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
│ │ "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
│ │ "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
│ │ +
│ │ # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
│ │ # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
│ │ "-DCOMPILER_RT_ENABLE_IOS=OFF"
│ │ ];
│ │
│ │ - preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
│ │ - cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
│ │ - '';
│ │ -
│ │ outputs = [ "out" "dev" ];
│ │
│ │ patches = [
│ │ ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
│ │ ./gnu-install-dirs.patch
│ │ # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
│ │ # extra `/`.
│ │ @@ -105,24 +102,28 @@
│ │ --replace "#include <stdlib.h>" ""
│ │ substituteInPlace lib/builtins/clear_cache.c \
│ │ --replace "#include <assert.h>" ""
│ │ substituteInPlace lib/builtins/cpu_model.c \
│ │ --replace "#include <assert.h>" ""
│ │ '';
│ │
│ │ + preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
│ │ + cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
│ │ + '';
│ │ +
│ │ # Hack around weird upsream RPATH bug
│ │ postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
│ │ ln -s "$out/lib"/*/* "$out/lib"
│ │ '' + lib.optionalString (useLLVM) ''
│ │ ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
│ │ ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
│ │ ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
│ │ ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
│ │ '' + lib.optionalString doFakeLibgcc ''
│ │ + ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
│ │ - ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
│ │ '';
│ │
│ │ meta = llvm_meta // {
│ │ homepage = "https://compiler-rt.llvm.org/";
│ │ description = "Compiler runtime libraries";
│ │ longDescription = ''
│ │ The compiler-rt project provides highly tuned implementations of the
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 6103 Blocks: 9 IO Block: 6144 regular file
│ │ │ - Size: 6101 Blocks: 9 IO Block: 6144 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ │ -Modify: 2023-11-24 23:54:24.468652681 +0000
│ │ --- pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/compiler-rt/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1156 Blocks: 9 IO Block: 1536 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ │ --- pkgs/development/compilers/llvm/git/compiler-rt/normalize-var.patch
│ ├── +++ pkgs/development/compilers/llvm/15/compiler-rt/normalize-var.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 657 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ - Size: 8 Blocks: 17 IO Block: 512 directory
│ │ + Size: 7 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-24 23:54:24.469652668 +0000
│ │ +Modify: 2023-11-25 01:05:56.898077418 +0000
│ --- pkgs/development/compilers/llvm/git/default.nix
├── +++ pkgs/development/compilers/llvm/15/default.nix
│ @@ -36,14 +36,15 @@
│ # corresponding to the `gitRelease` or `officialRelease` specified.
│ #
│ # You can provide your own LLVM source by specifying this arg but then it's up
│ # to you to make sure that the LLVM repo given matches the release configuration
│ # specified.
│ , monorepoSrc ? null
│ }:
│ +
│ assert let
│ int = a: if a then 1 else 0;
│ xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
│ in
│ lib.assertMsg
│ (xor
│ (gitRelease != null)
│ @@ -102,19 +103,18 @@
│ });
│ clang-manpages = lowPrio (tools.libclang.override {
│ enableManpages = true;
│ python3 = pkgs.python3; # don't use python-boot
│ });
│ - # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
│ - # lldb-manpages = lowPrio (tools.lldb.override {
│ - # enableManpages = true;
│ - # python3 = pkgs.python3; # don't use python-boot
│ - # });
│ + lldb-manpages = lowPrio (tools.lldb.override {
│ + enableManpages = true;
│ + python3 = pkgs.python3; # don't use python-boot
│ + });
│ # pick clang appropriate for package set we are targeting
│ clang =
│ /**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
│ else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
│ else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
│ else tools.libcxxClang;
│ @@ -140,34 +140,43 @@
│ };
│ lld = callPackage ./lld {
│ inherit llvm_meta;
│ };
│ lldb = callPackage ../common/lldb.nix {
│ - src = callPackage ({ runCommand }: runCommand "lldb-src-${version}" {} ''
│ - mkdir -p "$out"
│ - cp -r ${monorepoSrc}/cmake "$out"
│ - cp -r ${monorepoSrc}/lldb "$out"
│ - '') { };
│ patches =
│ let
│ resourceDirPatch = callPackage
│ ({ substituteAll, libclang }: substituteAll
│ {
│ src = ./lldb/resource-dir.patch;
│ clangLibDir = "${libclang.lib}/lib";
│ })
│ { };
│ in
│ [
│ - ./lldb/procfs.patch # FIXME: do we need this?
│ + ./lldb/procfs.patch
│ resourceDirPatch
│ ./lldb/gnu-install-dirs.patch
│ - ];
│ + ]
│ + # This is a stopgap solution if/until the macOS SDK used for x86_64 is
│ + # updated.
│ + #
│ + # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
│ + # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
│ + # of this preprocessor symbol in `lldb` with its expansion.
│ + #
│ + # See here for some context:
│ + # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
│ + ++ lib.optional (
│ + stdenv.targetPlatform.isDarwin
│ + && !stdenv.targetPlatform.isAarch64
│ + && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
│ + ) ./lldb/cpu_subtype_arm64e_replacement.patch;
│ inherit llvm_meta;
│ };
│ # Below, is the LLVM bootstrapping logic. It handles building a
│ # fully LLVM toolchain from scratch. No GCC toolchain should be
│ # pulled in. As a consequence, it is very quick to build different
│ # targets provided by LLVM and we can also build for what GCC
│ @@ -212,51 +221,61 @@
│ cc = tools.clang-unwrapped;
│ libcxx = null;
│ bintools = bintools';
│ extraPackages = [
│ targetLlvmLibraries.compiler-rt
│ ];
│ extraBuildCommands = mkExtraBuildCommands cc;
│ - nixSupport.cc-cflags = [
│ - "-rtlib=compiler-rt"
│ - "-B${targetLlvmLibraries.compiler-rt}/lib"
│ - "-nostdlib++"
│ - ];
│ + nixSupport.cc-cflags =
│ + [
│ + "-rtlib=compiler-rt"
│ + "-B${targetLlvmLibraries.compiler-rt}/lib"
│ + "-nostdlib++"
│ + ]
│ + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
│ };
│ clangNoLibc = wrapCCWith rec {
│ cc = tools.clang-unwrapped;
│ libcxx = null;
│ bintools = bintoolsNoLibc';
│ extraPackages = [
│ targetLlvmLibraries.compiler-rt
│ ];
│ extraBuildCommands = mkExtraBuildCommands cc;
│ - nixSupport.cc-cflags = [
│ - "-rtlib=compiler-rt"
│ - "-B${targetLlvmLibraries.compiler-rt}/lib"
│ - ];
│ + nixSupport.cc-cflags =
│ + [
│ + "-rtlib=compiler-rt"
│ + "-B${targetLlvmLibraries.compiler-rt}/lib"
│ + ]
│ + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
│ };
│ clangNoCompilerRt = wrapCCWith rec {
│ cc = tools.clang-unwrapped;
│ libcxx = null;
│ bintools = bintoolsNoLibc';
│ extraPackages = [ ];
│ extraBuildCommands = mkExtraBuildCommands0 cc;
│ - nixSupport.cc-cflags = [ "-nostartfiles" ];
│ + nixSupport.cc-cflags =
│ + [
│ + "-nostartfiles"
│ + ]
│ + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
│ };
│ - clangNoCompilerRtWithLibc = wrapCCWith rec {
│ + clangNoCompilerRtWithLibc = wrapCCWith (rec {
│ cc = tools.clang-unwrapped;
│ libcxx = null;
│ bintools = bintools';
│ extraPackages = [ ];
│ extraBuildCommands = mkExtraBuildCommands0 cc;
│ - };
│ + } // lib.optionalAttrs stdenv.targetPlatform.isWasm {
│ + nixSupport.cc-cflags = [ "-fno-exceptions" ];
│ + });
│ });
│ libraries = lib.makeExtensible (libraries: let
│ callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc; });
│ in {
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ - Size: 12137 Blocks: 9 IO Block: 12288 regular file
│ │ + Size: 12878 Blocks: 9 IO Block: 13312 regular file
│ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ --- pkgs/development/compilers/llvm/git/libcxx
├── +++ pkgs/development/compilers/llvm/15/libcxx
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/libcxx/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/libcxx/default.nix
│ │ @@ -1,9 +1,9 @@
│ │ { lib, stdenv, llvm_meta
│ │ +, monorepoSrc, runCommand, fetchpatch
│ │ -, monorepoSrc, runCommand
│ │ , cmake, ninja, python3, fixDarwinDylibNames, version
│ │ , cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
│ │ , libcxxabi, libcxxrt, libunwind
│ │ , enableShared ? !stdenv.hostPlatform.isStatic
│ │
│ │ # If headersOnly is true, the resulting package would only include the headers.
│ │ # Use this to break the circular dependency between libcxx and libcxxabi.
│ │ @@ -43,14 +43,23 @@
│ │ prePatch = ''
│ │ cd ../${basename}
│ │ chmod -R u+w .
│ │ '';
│ │
│ │ patches = [
│ │ ./gnu-install-dirs.patch
│ │ + # See:
│ │ + # - https://reviews.llvm.org/D133566
│ │ + # - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432
│ │ + # !!! Drop in LLVM 16+
│ │ + (fetchpatch {
│ │ + url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch";
│ │ + hash = "sha256-AaM9A6tQ4YAw7uDqCIV4VaiUyLZv+unwcOqbakwW9/k=";
│ │ + relative = "libcxx";
│ │ + })
│ │ ] ++ lib.optionals stdenv.hostPlatform.isMusl [
│ │ ../../libcxx-0001-musl-hacks.patch
│ │ ];
│ │
│ │ postPatch = ''
│ │ cd ../runtimes
│ │ '';
│ │ @@ -62,15 +71,14 @@
│ │ nativeBuildInputs = [ cmake ninja python3 ]
│ │ ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
│ │
│ │ buildInputs =
│ │ lib.optionals (!headersOnly) [ cxxabi ]
│ │ ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ libunwind ];
│ │
│ │ -
│ │ cmakeFlags = let
│ │ # See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
│ │ libcxx_cxx_abi_opt = {
│ │ "c++abi" = "system-libcxxabi";
│ │ "cxxrt" = "libcxxrt";
│ │ }.${cxxabi.libName} or (throw "unknown cxxabi: ${cxxabi.libName} (${cxxabi.pname})");
│ │ in [
│ │ @@ -80,15 +88,15 @@
│ │ ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
│ │ ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
│ │ "-DLIBCXX_USE_COMPILER_RT=ON"
│ │ # (Backport fix from 16, which has LIBCXX_ADDITIONAL_LIBRARIES, but 15
│ │ # does not appear to)
│ │ # There's precedent for this in llvm-project/libcxx/cmake/caches.
│ │ # In a monorepo build you might do the following in the libcxxabi build:
│ │ + # -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwind
│ │ - # -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwinder
│ │ # -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
│ │ # libcxx appears to require unwind and doesn't pull it in via other means.
│ │ # "-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
│ │ "-DCMAKE_SHARED_LINKER_FLAGS=-lunwind"
│ │ ] ++ lib.optionals stdenv.hostPlatform.isWasm [
│ │ "-DLIBCXX_ENABLE_THREADS=OFF"
│ │ "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 4635 Blocks: 9 IO Block: 5120 regular file
│ │ │ - Size: 4238 Blocks: 9 IO Block: 4608 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/libcxx/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1525 Blocks: 9 IO Block: 1536 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ --- pkgs/development/compilers/llvm/git/libcxxabi
├── +++ pkgs/development/compilers/llvm/15/libcxxabi
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/libcxxabi/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/libcxxabi/default.nix
│ │ @@ -78,31 +78,19 @@
│ │ "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
│ │ ] ++ lib.optionals (!enableShared) [
│ │ "-DLIBCXXABI_ENABLE_SHARED=OFF"
│ │ ];
│ │
│ │ preInstall = lib.optionalString stdenv.isDarwin ''
│ │ for file in lib/*.dylib; do
│ │ - if [ -L "$file" ]; then continue; fi
│ │ -
│ │ - # Fix up the install name. Preserve the basename, just replace the path.
│ │ - installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
│ │ -
│ │ # this should be done in CMake, but having trouble figuring out
│ │ # the magic combination of necessary CMake variables
│ │ # if you fancy a try, take a look at
│ │ # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
│ │ + install_name_tool -id $out/$file $file
│ │ - ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
│ │ -
│ │ - # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
│ │ - # libcxxabi to sometimes link against a different version of itself.
│ │ - # Here we simply make that second reference point to ourselves.
│ │ - for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
│ │ - ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
│ │ - done
│ │ done
│ │ '';
│ │
│ │ postInstall = ''
│ │ mkdir -p "$dev/include"
│ │ install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
│ │ '';
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 3887 Blocks: 9 IO Block: 4096 regular file
│ │ │ - Size: 4561 Blocks: 9 IO Block: 4608 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/libcxxabi/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1228 Blocks: 9 IO Block: 1536 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.421431575 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ --- pkgs/development/compilers/llvm/git/libunwind
├── +++ pkgs/development/compilers/llvm/15/libunwind
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/libunwind/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/libunwind/default.nix
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1930 Blocks: 9 IO Block: 2048 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/libunwind/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1141 Blocks: 9 IO Block: 1536 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ --- pkgs/development/compilers/llvm/git/lld
├── +++ pkgs/development/compilers/llvm/15/lld
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-24 23:54:24.387653683 +0000
│ │ -Modify: 2023-11-24 23:54:24.470652655 +0000
│ │ --- pkgs/development/compilers/llvm/git/lld/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/lld/default.nix
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1644 Blocks: 9 IO Block: 2048 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 23:54:24.387653683 +0000
│ │ │ -Modify: 2023-11-24 23:54:24.470652655 +0000
│ │ --- pkgs/development/compilers/llvm/git/lld/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/lld/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 2002 Blocks: 9 IO Block: 2048 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 4 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-24 23:54:24.470652655 +0000
│ │ +Modify: 2023-11-24 23:54:24.387653683 +0000
│ --- pkgs/development/compilers/llvm/git/lldb
├── +++ pkgs/development/compilers/llvm/15/lldb
│ ├── file list
│ │ @@ -1,3 +1,4 @@
│ │ +cpu_subtype_arm64e_replacement.patch
│ │ gnu-install-dirs.patch
│ │ procfs.patch
│ │ resource-dir.patch
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ + Size: 6 Blocks: 17 IO Block: 512 directory
│ │ - Size: 5 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ -Modify: 2023-11-25 01:05:56.165074945 +0000
│ │ --- pkgs/development/compilers/llvm/git/lldb/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/lldb/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 903 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.407431597 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/lldb/procfs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/lldb/procfs.patch
│ │ @@ -1,18 +1,24 @@
│ │ --- a/source/Plugins/Process/Linux/Procfs.h
│ │ +++ b/source/Plugins/Process/Linux/Procfs.h
│ │ +@@ -10,6 +10,13 @@
│ │ -@@ -10,6 +10,7 @@
│ │ // sys/procfs.h on Android/Linux for all supported architectures.
│ │
│ │ #include <sys/ptrace.h>
│ │ +#include <asm/ptrace.h>
│ │ ++
│ │ ++// on i686 preprocessor symbols with these register names are defined as
│ │ ++// numeric constants; these symbols clash with identifier names used in
│ │ ++// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
│ │ ++#undef FS
│ │ ++#undef CS
│ │
│ │ #include "lldb/lldb-types.h"
│ │
│ │ +@@ -17,23 +24,13 @@
│ │ -@@ -17,23 +18,13 @@
│ │
│ │ #include <vector>
│ │
│ │ -#ifdef __ANDROID__
│ │ -#if defined(__arm64__) || defined(__aarch64__)
│ │ -typedef unsigned long elf_greg_t;
│ │ -typedef elf_greg_t
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 1232 Blocks: 9 IO Block: 1536 regular file
│ │ │ - Size: 992 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/lldb/resource-dir.patch
│ ├── +++ pkgs/development/compilers/llvm/15/lldb/resource-dir.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 809 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ - Size: 5 Blocks: 17 IO Block: 512 directory
│ │ + Size: 6 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-25 01:05:56.165074945 +0000
│ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ --- pkgs/development/compilers/llvm/git/llvm
├── +++ pkgs/development/compilers/llvm/15/llvm
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 8 Blocks: 49 IO Block: 16384 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/llvm/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/llvm/default.nix
│ │ @@ -3,16 +3,17 @@
│ │ , monorepoSrc
│ │ , runCommand
│ │ , fetchpatch
│ │ , cmake
│ │ , darwin
│ │ , ninja
│ │ , python3
│ │ +, python3Packages
│ │ , libffi
│ │ +, enableGoldPlugin ? libbfd.hasPluginAPI
│ │ -, enableGoldPlugin ? (!stdenv.isDarwin && !stdenv.targetPlatform.isWasi)
│ │ , libbfd
│ │ , libpfm
│ │ , libxml2
│ │ , ncurses
│ │ , version
│ │ , release_version
│ │ , zlib
│ │ @@ -52,17 +53,20 @@
│ │ # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
│ │ # because this package is shadowed in `$PATH` by the regular `python3`
│ │ # package.
│ │ #
│ │ # So, we "manually" assemble one python derivation for the package to depend
│ │ # on, taking into account whether checks are enabled or not:
│ │ python = if doCheck then
│ │ + # Note that we _explicitly_ ask for a python interpreter for our host
│ │ + # platform here; the splicing that would ordinarily take care of this for
│ │ + # us does not seem to work once we use `withPackages`.
│ │ let
│ │ checkDeps = ps: with ps; [ psutil ];
│ │ + in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
│ │ - in python3.withPackages checkDeps
│ │ else python3;
│ │
│ │ in stdenv.mkDerivation (rec {
│ │ pname = "llvm";
│ │ inherit version;
│ │
│ │ src = runCommand "${pname}-src-${version}" {} (''
│ │ @@ -76,15 +80,19 @@
│ │ '');
│ │
│ │ sourceRoot = "${src.name}/${pname}";
│ │
│ │ outputs = [ "out" "lib" "dev" "python" ];
│ │
│ │ nativeBuildInputs = [ cmake ninja python ]
│ │ + ++ optionals enableManpages [
│ │ + # Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
│ │ + # splicing does *not* work with the latter. (TODO: fix)
│ │ + python3Packages.sphinx python3Packages.recommonmark
│ │ + ];
│ │ - ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
│ │
│ │ buildInputs = [ libxml2 libffi ]
│ │ ++ optional enablePFM libpfm; # exegesis
│ │
│ │ propagatedBuildInputs = [ ncurses zlib ];
│ │
│ │ nativeCheckInputs = [
│ │ @@ -148,23 +156,24 @@
│ │ ./polly-lit-cfg-add-libs-to-dylib-path.patch
│ │ ];
│ │
│ │ postPatch = optionalString stdenv.isDarwin ''
│ │ 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`)
│ │ # and thus fails under the sandbox:
│ │ substituteInPlace unittests/Support/Host.cpp \
│ │ --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
│ │ + '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
│ │ - '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
│ │ # This test tries to call the intrinsics `@llvm.roundeven.f32` and
│ │ # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
│ │ # and `roundeven` on x86_64 macOS.
│ │ #
│ │ # However these functions are glibc specific so the test fails:
│ │ # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
│ │ # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
│ │ @@ -205,23 +214,25 @@
│ │ # TODO(@rrbutani): fix/follow-up
│ │ substituteInPlace unittests/Support/Host.cpp \
│ │ --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
│ │
│ │ # This test fails with a `dysmutil` crash; have not yet dug into what's
│ │ # going on here (TODO(@rrbutani)).
│ │ rm test/tools/dsymutil/ARM/obfuscated.test
│ │ + '' + ''
│ │ - '' + ''
│ │ # FileSystem permissions tests fail with various special bits
│ │ substituteInPlace unittests/Support/CMakeLists.txt \
│ │ --replace "Path.cpp" ""
│ │ rm unittests/Support/Path.cpp
│ │ substituteInPlace unittests/IR/CMakeLists.txt \
│ │ --replace "PassBuilderCallbacksTest.cpp" ""
│ │ rm unittests/IR/PassBuilderCallbacksTest.cpp
│ │ rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
│ │ + # timing-based tests are trouble
│ │ + rm utils/lit/tests/googletest-timeout.py
│ │ '' + optionalString stdenv.hostPlatform.isMusl ''
│ │ patch -p1 -i ${../../TLI-musl.patch}
│ │ substituteInPlace unittests/Support/CMakeLists.txt \
│ │ --replace "add_subdirectory(DynamicLibrary)" ""
│ │ rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
│ │ # valgrind unhappy with musl or glibc, but fails w/musl only
│ │ rm test/CodeGen/AArch64/wineh4.mir
│ │ @@ -230,14 +241,20 @@
│ │ rm test/DebugInfo/X86/convert-debugloc.ll
│ │ rm test/DebugInfo/X86/convert-inlined.ll
│ │ rm test/DebugInfo/X86/convert-linked.ll
│ │ rm test/tools/dsymutil/X86/op-convert.test
│ │ rm test/tools/gold/X86/split-dwarf.ll
│ │ rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
│ │ rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
│ │ +
│ │ + # !!! Note: these tests are removed in LLVM 16.
│ │ + #
│ │ + # See here for context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999790443
│ │ + rm test/CodeGen/RISCV/rv32zbp.ll
│ │ + rm test/CodeGen/RISCV/rv64zbp.ll
│ │ '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
│ │ # Seems to require certain floating point hardware (NEON?)
│ │ rm test/ExecutionEngine/frem.ll
│ │ '' + ''
│ │ patchShebangs test/BugPoint/compile-custom.ll.py
│ │ '';
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 18678 Blocks: 17 IO Block: 18944 regular file
│ │ │ - Size: 17985 Blocks: 17 IO Block: 18432 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-25 01:05:56.900077425 +0000
│ │ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ --- pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs-polly.patch
│ ├── +++ pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs-polly.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 913 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/llvm/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 6995 Blocks: 9 IO Block: 7168 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/llvm/lit-shell-script-runner-set-dyld-library-path.patch
│ ├── +++ pkgs/development/compilers/llvm/15/llvm/lit-shell-script-runner-set-dyld-library-path.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 1117 Blocks: 9 IO Block: 1536 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
│ ├── +++ pkgs/development/compilers/llvm/15/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 3070 Blocks: 9 IO Block: 3072 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
│ ├── +++ pkgs/development/compilers/llvm/15/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 918 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.408431596 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 8 Blocks: 49 IO Block: 16384 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-25 01:05:56.907077449 +0000
│ │ +Modify: 2023-11-25 01:05:56.899077422 +0000
│ --- pkgs/development/compilers/llvm/git/openmp
├── +++ pkgs/development/compilers/llvm/15/openmp
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 6 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ +Modify: 2023-11-24 23:54:24.383653733 +0000
│ │ -Modify: 2023-11-24 23:54:24.469652668 +0000
│ │ --- pkgs/development/compilers/llvm/git/openmp/default.nix
│ ├── +++ pkgs/development/compilers/llvm/15/openmp/default.nix
│ │ @@ -7,14 +7,15 @@
│ │ , ninja
│ │ , llvm
│ │ , targetLlvm
│ │ , lit
│ │ , clang-unwrapped
│ │ , perl
│ │ , pkg-config
│ │ +, xcbuild
│ │ , version
│ │ }:
│ │
│ │ stdenv.mkDerivation rec {
│ │ pname = "openmp";
│ │ inherit version;
│ │
│ │ @@ -35,14 +36,16 @@
│ │ outputs = [ "out" "dev" ];
│ │
│ │ nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
│ │ buildInputs = [
│ │ (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
│ │ ];
│ │
│ │ + nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
│ │ +
│ │ # Unsup:Pass:XFail:Fail
│ │ # 26:267:16:8
│ │ doCheck = false;
│ │ checkTarget = "check-openmp";
│ │
│ │ preCheck = ''
│ │ patchShebangs ../tools/archer/tests/deflake.bash
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ + Size: 1779 Blocks: 9 IO Block: 2048 regular file
│ │ │ - Size: 1689 Blocks: 9 IO Block: 2048 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 23:54:24.383653733 +0000
│ │ │ -Modify: 2023-11-24 23:54:24.469652668 +0000
│ │ --- pkgs/development/compilers/llvm/git/openmp/fix-find-tool.patch
│ ├── +++ pkgs/development/compilers/llvm/15/openmp/fix-find-tool.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 972 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.409431594 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/openmp/gnu-install-dirs.patch
│ ├── +++ pkgs/development/compilers/llvm/15/openmp/gnu-install-dirs.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 982 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.409431594 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ │ --- pkgs/development/compilers/llvm/git/openmp/run-lit-directly.patch
│ ├── +++ pkgs/development/compilers/llvm/15/openmp/run-lit-directly.patch
│ │ ├── stat {}
│ │ │ @@ -1,7 +1,7 @@
│ │ │
│ │ │ Size: 579 Blocks: 9 IO Block: 1024 regular file
│ │ │ Device: 0,52 Access: (0644/-rw-r--r--) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │ │
│ │ │ +Modify: 2023-11-24 02:16:27.409431594 +0000
│ │ │ -Modify: 2023-11-24 02:16:27.422431574 +0000
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ Size: 6 Blocks: 17 IO Block: 512 directory
│ │ Device: 0,52 Access: (0755/drwxr-xr-x) Uid: ( 1000/ artturin) Gid: ( 1000/ artturin)
│ │
│ │ -Modify: 2023-11-24 23:54:24.469652668 +0000
│ │ +Modify: 2023-11-24 23:54:24.383653733 +0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment