Unverified Commit 3cbbfb17 authored by Tristan Ross's avatar Tristan Ross Committed by GitHub
Browse files

pkgs/development/compilers/llvm/common/default.nix: move patches into… (#389658)

pkgs/development/compilers/llvm/common/default.nix: move patches into patches.nix
parent e7fa733d
Loading
Loading
Loading
Loading
+2 −226
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
  officialRelease ? null,
  monorepoSrc ? null,
  version ? null,
  patchesFn ? lib.id,
  # Allows passthrough to packages via newScope. This makes it possible to
  # do `(llvmPackages.override { <someLlvmDependency> = bar; }).clang` and get
  # an llvmPackages whose packages are overridden in an internally consistent way.
@@ -80,232 +81,7 @@ let
        name = builtins.baseNameOf p;
        path =
          let
            patches = {
              "clang/gnu-install-dirs.patch" = [
                {
                  before = "14";
                  path = ../12;
                }
                {
                  after = "19";
                  path = ../19;
                }
              ];
              "clang/purity.patch" = [
                {
                  after = "18";
                  path = ../18;
                }
                {
                  before = "17";
                  after = "15";
                  path = ../15;
                }
                {
                  before = "16";
                  path = ../12;
                }
              ];
              "clang/aarch64-tblgen.patch" = [
                {
                  after = "17";
                  before = "18";
                  path = ../17;
                }
              ];
              "lld/add-table-base.patch" = [
                {
                  after = "16";
                  path = ../16;
                }
              ];
              "lld/gnu-install-dirs.patch" = [
                {
                  after = "18";
                  path = ../18;
                }
                {
                  before = "14";
                  path = ../12;
                }
              ];
              "llvm/gnu-install-dirs.patch" = [
                {
                  after = "20";
                  path = ../20;
                }
                {
                  after = "18";
                  before = "20";
                  path = ../18;
                }
              ];
              "llvm/gnu-install-dirs-polly.patch" = [
                {
                  after = "20";
                  path = ../20;
                }
                {
                  before = "20";
                  after = "18";
                  path = ../18;
                }
                {
                  before = "18";
                  after = "14";
                  path = ../14;
                }
              ];
              "llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch" = [
                {
                  before = "17";
                  after = "15";
                  path = ../15;
                }
                {
                  after = "17";
                  path = ../17;
                }
              ];
              "llvm/lit-shell-script-runner-set-dyld-library-path.patch" = [
                {
                  after = "18";
                  path = ../18;
                }
                {
                  after = "16";
                  before = "18";
                  path = ../16;
                }
              ];
              "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch" = [
                {
                  after = "15";
                  path = ../15;
                }
              ];
              "libunwind/gnu-install-dirs.patch" = [
                {
                  before = "17";
                  after = "15";
                  path = ../15;
                }
              ];
              "compiler-rt/X86-support-extension.patch" = [
                {
                  after = "15";
                  path = ../15;
                }
                {
                  before = "15";
                  path = ../12;
                }
              ];
              "compiler-rt/armv6-scudo-libatomic.patch" = [
                {
                  after = "19";
                  path = ../19;
                }
                {
                  after = "15";
                  before = "19";
                  path = ../15;
                }
                {
                  before = "15";
                  path = ../14;
                }
              ];
              "compiler-rt/armv7l.patch" = [
                {
                  before = "15";
                  after = "13";
                  path = ../13;
                }
              ];
              "compiler-rt/gnu-install-dirs.patch" = [
                {
                  before = "14";
                  path = ../12;
                }
                {
                  after = "13";
                  before = "15";
                  path = ../14;
                }
                {
                  after = "15";
                  before = "17";
                  path = ../15;
                }
                {
                  after = "16";
                  path = ../17;
                }
              ];
              "compiler-rt/darwin-targetconditionals.patch" = [
                {
                  after = "13";
                  path = ../13;
                }
              ];
              "compiler-rt/codesign.patch" = [
                {
                  after = "13";
                  path = ../13;
                }
              ];
              "compiler-rt/normalize-var.patch" = [
                {
                  after = "16";
                  path = ../16;
                }
                {
                  before = "16";
                  path = ../12;
                }
              ];
              "lldb/procfs.patch" = [
                {
                  after = "15";
                  path = ../15;
                }
                {
                  before = "15";
                  path = ../12;
                }
              ];
              "lldb/resource-dir.patch" = [
                {
                  before = "16";
                  path = ../12;
                }
              ];
              "openmp/fix-find-tool.patch" = [
                {
                  after = "17";
                  before = "19";
                  path = ../17;
                }
              ];
              "openmp/run-lit-directly.patch" = [
                {
                  after = "16";
                  path = ../16;
                }
                {
                  after = "14";
                  before = "16";
                  path = ../14;
                }
              ];
              "libclc/use-default-paths.patch" = [
                {
                  after = "19";
                  path = ../19;
                }
              ];
            };
            patches = args.patchesFn (import ./patches.nix);

            constraints = patches."${p}" or null;
            matchConstraint =
+226 −0
Original line number Diff line number Diff line
{
  "clang/gnu-install-dirs.patch" = [
    {
      before = "14";
      path = ../12;
    }
    {
      after = "19";
      path = ../19;
    }
  ];
  "clang/purity.patch" = [
    {
      after = "18";
      path = ../18;
    }
    {
      before = "17";
      after = "15";
      path = ../15;
    }
    {
      before = "16";
      path = ../12;
    }
  ];
  "clang/aarch64-tblgen.patch" = [
    {
      after = "17";
      before = "18";
      path = ../17;
    }
  ];
  "lld/add-table-base.patch" = [
    {
      after = "16";
      path = ../16;
    }
  ];
  "lld/gnu-install-dirs.patch" = [
    {
      after = "18";
      path = ../18;
    }
    {
      before = "14";
      path = ../12;
    }
  ];
  "llvm/gnu-install-dirs.patch" = [
    {
      after = "20";
      path = ../20;
    }
    {
      after = "18";
      before = "20";
      path = ../18;
    }
  ];
  "llvm/gnu-install-dirs-polly.patch" = [
    {
      after = "20";
      path = ../20;
    }
    {
      before = "20";
      after = "18";
      path = ../18;
    }
    {
      before = "18";
      after = "14";
      path = ../14;
    }
  ];
  "llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch" = [
    {
      before = "17";
      after = "15";
      path = ../15;
    }
    {
      after = "17";
      path = ../17;
    }
  ];
  "llvm/lit-shell-script-runner-set-dyld-library-path.patch" = [
    {
      after = "18";
      path = ../18;
    }
    {
      after = "16";
      before = "18";
      path = ../16;
    }
  ];
  "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch" = [
    {
      after = "15";
      path = ../15;
    }
  ];
  "libunwind/gnu-install-dirs.patch" = [
    {
      before = "17";
      after = "15";
      path = ../15;
    }
  ];
  "compiler-rt/X86-support-extension.patch" = [
    {
      after = "15";
      path = ../15;
    }
    {
      before = "15";
      path = ../12;
    }
  ];
  "compiler-rt/armv6-scudo-libatomic.patch" = [
    {
      after = "19";
      path = ../19;
    }
    {
      after = "15";
      before = "19";
      path = ../15;
    }
    {
      before = "15";
      path = ../14;
    }
  ];
  "compiler-rt/armv7l.patch" = [
    {
      before = "15";
      after = "13";
      path = ../13;
    }
  ];
  "compiler-rt/gnu-install-dirs.patch" = [
    {
      before = "14";
      path = ../12;
    }
    {
      after = "13";
      before = "15";
      path = ../14;
    }
    {
      after = "15";
      before = "17";
      path = ../15;
    }
    {
      after = "16";
      path = ../17;
    }
  ];
  "compiler-rt/darwin-targetconditionals.patch" = [
    {
      after = "13";
      path = ../13;
    }
  ];
  "compiler-rt/codesign.patch" = [
    {
      after = "13";
      path = ../13;
    }
  ];
  "compiler-rt/normalize-var.patch" = [
    {
      after = "16";
      path = ../16;
    }
    {
      before = "16";
      path = ../12;
    }
  ];
  "lldb/procfs.patch" = [
    {
      after = "15";
      path = ../15;
    }
    {
      before = "15";
      path = ../12;
    }
  ];
  "lldb/resource-dir.patch" = [
    {
      before = "16";
      path = ../12;
    }
  ];
  "openmp/fix-find-tool.patch" = [
    {
      after = "17";
      before = "19";
      path = ../17;
    }
  ];
  "openmp/run-lit-directly.patch" = [
    {
      after = "16";
      path = ../16;
    }
    {
      after = "14";
      before = "16";
      path = ../14;
    }
  ];
  "libclc/use-default-paths.patch" = [
    {
      after = "19";
      path = ../19;
    }
  ];
}
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
  bootBintoolsNoLibc ? if stdenv.targetPlatform.linker == "lld" then null else pkgs.bintoolsNoLibc,
  bootBintools ? if stdenv.targetPlatform.linker == "lld" then null else pkgs.bintools,
  llvmVersions ? { },
  patchesFn ? lib.id,
  # Allows passthrough to packages via newScope in ./common/default.nix.
  # This makes it possible to do
  # `(llvmPackages.override { <someLlvmDependency> = bar; }).clang` and get
@@ -74,6 +75,7 @@ let
              gitRelease
              monorepoSrc
              version
              patchesFn
              ;
          }
          // packageSetArgs # Allow overrides.