Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions pkgs/development/compilers/llvm/12/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
, preLibcCrossHeaders
, substitute, fetchFromGitHub, fetchpatch
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
Expand Down Expand Up @@ -114,7 +115,11 @@ let
extraBuildCommands = mkExtraBuildCommands cc;
};

lld = callPackage ./lld {
lld = callPackage ../common/lld {
src = fetch "lld" "0qg3fgc7wj34hdkqn21y03zcmsdd01szhhm1hfki63iifrm3y2v9";
patches = [
./lld/gnu-install-dirs.patch
];
inherit llvm_meta;
inherit (libraries) libunwind;
};
Expand Down Expand Up @@ -253,18 +258,57 @@ let

libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;

libcxx = callPackage ./libcxx {
libcxx = callPackage ../common/libcxx {
src = fetchFromGitHub {
owner = "llvm";
repo = "llvm-project";
rev = "refs/tags/llvmorg-${version}";
sparseCheckout = [
"libcxx"
"libcxxabi"
"llvm/cmake"
"llvm/utils"
"runtimes"
];
hash = "sha256-etxgXIdWxMTmbZ83Hsc0w6Jt5OSQSUEPVEWqLkHsNBY=";
};
patches = [
(substitute {
src = ../common/libcxxabi/wasm.patch;
replacements = [
"--replace-fail" "/cmake/" "/llvm/cmake/"
];
})
] ++ lib.optionals stdenv.hostPlatform.isMusl [
(substitute {
src = ../common/libcxx/libcxx-0001-musl-hacks.patch;
replacements = [
"--replace-fail" "/include/" "/libcxx/include/"
];
})
];
inherit llvm_meta;
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};

libunwind = callPackage ./libunwind {
libunwind = callPackage ../common/libunwind {
src = fetch "libunwind" "192ww6n81lj2mb9pj4043z79jp3cf58a9c2qrxjwm5c3a64n1shb";
patches = [
./libunwind/gnu-install-dirs.patch
];
inherit llvm_meta;
inherit (buildLlvmTools) llvm;
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};

openmp = callPackage ./openmp {
openmp = callPackage ../common/openmp {
src = fetch "openmp" "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0";
patches = [
# Fix cross.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
})
];
inherit llvm_meta targetLlvm;
};
});
Expand Down
37 changes: 0 additions & 37 deletions pkgs/development/compilers/llvm/12/libunwind/default.nix

This file was deleted.

48 changes: 0 additions & 48 deletions pkgs/development/compilers/llvm/12/openmp/default.nix

This file was deleted.

20 changes: 17 additions & 3 deletions pkgs/development/compilers/llvm/13/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
, preLibcCrossHeaders
, fetchpatch
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
Expand Down Expand Up @@ -142,7 +143,10 @@ in let
extraBuildCommands = mkExtraBuildCommands cc;
};

lld = callPackage ./lld {
lld = callPackage ../common/lld {
patches = [
./lld/gnu-install-dirs.patch
];
inherit llvm_meta;
};

Expand Down Expand Up @@ -299,12 +303,22 @@ in let
monorepoSrc = src;
};

libunwind = callPackage ./libunwind {
libunwind = callPackage ../common/libunwind {
patches = [
./libunwind/gnu-install-dirs.patch
];
inherit llvm_meta;
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};

openmp = callPackage ./openmp {
openmp = callPackage ../common/openmp {
patches = [
# Fix cross.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
})
];
inherit llvm_meta targetLlvm;
};
});
Expand Down
33 changes: 0 additions & 33 deletions pkgs/development/compilers/llvm/13/libunwind/default.nix

This file was deleted.

55 changes: 0 additions & 55 deletions pkgs/development/compilers/llvm/13/lld/default.nix

This file was deleted.

53 changes: 0 additions & 53 deletions pkgs/development/compilers/llvm/13/openmp/default.nix

This file was deleted.

17 changes: 14 additions & 3 deletions pkgs/development/compilers/llvm/14/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ in let
extraBuildCommands = mkExtraBuildCommands cc;
};

lld = callPackage ./lld {
lld = callPackage ../common/lld {
patches = [
./lld/gnu-install-dirs.patch
./lld/fix-root-src-dir.patch
];
inherit llvm_meta;
};

Expand Down Expand Up @@ -297,12 +301,19 @@ in let
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};

libunwind = callPackage ./libunwind {
libunwind = callPackage ../common/libunwind {
patches = [
./libunwind/gnu-install-dirs.patch
];
inherit llvm_meta;
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};

openmp = callPackage ./openmp {
openmp = callPackage ../common/openmp {
patches = [
./openmp/gnu-install-dirs.patch
./openmp/run-lit-directly.patch
];
inherit llvm_meta targetLlvm;
};
});
Expand Down
Loading