llvmPackages_12: init at 12.0.0-rc3
https://lists.llvm.org/pipermail/release-testers/2021-March/001496.html
This commit is contained in:
parent
2fd9e41719
commit
7c27d49815
11 changed files with 60 additions and 32 deletions
|
@ -8,7 +8,7 @@ let
|
||||||
pname = "clang";
|
pname = "clang";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch "clang" "12sm91qx2m79cvj75a9aazf2x8xybjbd593dv6v7rxficpq8i0ha";
|
src = fetch "clang" "1xg2wy86zdj1d4h33n9mmb4j0x8bp9a5pk4qnnx3imlh8n6vhrqj";
|
||||||
inherit clang-tools-extra_src;
|
inherit clang-tools-extra_src;
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
|
@ -16,7 +16,6 @@ let
|
||||||
mv clang-* clang
|
mv clang-* clang
|
||||||
sourceRoot=$PWD/clang
|
sourceRoot=$PWD/clang
|
||||||
unpackFile ${clang-tools-extra_src}
|
unpackFile ${clang-tools-extra_src}
|
||||||
mv clang-tools-extra-* $sourceRoot/tools/extra
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 lld ]
|
nativeBuildInputs = [ cmake python3 lld ]
|
||||||
|
@ -50,9 +49,6 @@ let
|
||||||
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
|
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
||||||
substituteInPlace tools/extra/clangd/CMakeLists.txt \
|
|
||||||
--replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "lib" "python" ];
|
outputs = [ "out" "lib" "python" ];
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "compiler-rt";
|
pname = "compiler-rt";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = fetch pname "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy";
|
src = fetch pname "1n4jf0clwj3q0vfc7xjl0k4dqj69fvgsmib8qdqh45imgamnypvb";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 llvm ];
|
nativeBuildInputs = [ cmake python3 llvm ];
|
||||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
, buildPackages
|
, buildPackages
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
|
, darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
release_version = "11.1.0";
|
release_version = "12.0.0";
|
||||||
candidate = ""; # empty or "rcN"
|
candidate = "rc3"; # empty or "rcN"
|
||||||
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
||||||
version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
|
version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
|
||||||
targetConfig = stdenv.targetPlatform.config;
|
targetConfig = stdenv.targetPlatform.config;
|
||||||
|
@ -17,7 +18,7 @@ let
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
clang-tools-extra_src = fetch "clang-tools-extra" "18n1w1hkv931xzq02b34wglbv6zd6sd0r5kb8piwvag7klj7qw3n";
|
clang-tools-extra_src = fetch "clang-tools-extra" "1p6ln69iciwwpng226mfvxf3vylfvbz73y0a4y4v2rg7pn7hk671";
|
||||||
|
|
||||||
tools = lib.makeExtensible (tools: let
|
tools = lib.makeExtensible (tools: let
|
||||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||||
|
@ -79,9 +80,15 @@ let
|
||||||
extraBuildCommands = mkExtraBuildCommands cc;
|
extraBuildCommands = mkExtraBuildCommands cc;
|
||||||
};
|
};
|
||||||
|
|
||||||
lld = callPackage ./lld.nix {};
|
lld = callPackage ./lld.nix {
|
||||||
|
libunwind = libraries.libunwind;
|
||||||
|
};
|
||||||
|
|
||||||
lldb = callPackage ./lldb.nix {};
|
lldb = callPackage ./lldb.nix {
|
||||||
|
inherit (darwin) libobjc bootstrap_cmds;
|
||||||
|
inherit (darwin.apple_sdk.libs) xpc;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa;
|
||||||
|
};
|
||||||
|
|
||||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||||
|
|
|
@ -6,7 +6,7 @@ stdenv.mkDerivation {
|
||||||
pname = "libc++";
|
pname = "libc++";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch "libcxx" "1rgqsqpgi0vkga5d7hy0iyfsqgzfz7q1xy7afdfa1snp1qjks8xv";
|
src = fetch "libcxx" "1114yvbipwdk1qk1xrb7s05hf7cycyknpf4ph0wbqpjzzzxk0hgk";
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
unpackFile ${libcxxabi.src}
|
unpackFile ${libcxxabi.src}
|
||||||
|
|
|
@ -6,7 +6,7 @@ stdenv.mkDerivation {
|
||||||
pname = "libc++abi";
|
pname = "libc++abi";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch "libcxxabi" "1azcf31mxw59hb1x17xncnm3dyw90ylh8rqx462lvypqh3nr6c8l";
|
src = fetch "libcxxabi" "1vdc6zld5rlbrbpxf0fxs0m6k1cabpi82ksiwgj1pmhx8l140n0q";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
||||||
|
|
|
@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
|
||||||
pname = "libunwind";
|
pname = "libunwind";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch pname "1vpqs2c358v8fbr1r8jmzkfqk12jllimjcfmgxga127ksq9b37nj";
|
src = fetch pname "18n3k2kf6pyvzspnz1i22czbgi14kmch76fxml8kvhky7mw7v1yz";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ lib, stdenv
|
{ lib, stdenv
|
||||||
, fetch
|
, fetch
|
||||||
|
, libunwind
|
||||||
, cmake
|
, cmake
|
||||||
, libxml2
|
, libxml2
|
||||||
, llvm
|
, llvm
|
||||||
|
@ -10,11 +11,18 @@ stdenv.mkDerivation rec {
|
||||||
pname = "lld";
|
pname = "lld";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch pname "1kk61i7z5bi9i11rzsd2b388d42if1c7a45zkaa4mk0yps67hyh1";
|
src = fetch pname "097pxd7hgipr538vi48q8fi5svbd03bx3d078a06wigmvb7kzvw1";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ llvm libxml2 ];
|
buildInputs = [ llvm libxml2 ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace MachO/CMakeLists.txt --replace \
|
||||||
|
'(''${LLVM_MAIN_SRC_DIR}/' '('
|
||||||
|
mkdir -p libunwind/include
|
||||||
|
tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
|
||||||
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
@ -11,7 +11,12 @@
|
||||||
, clang-unwrapped
|
, clang-unwrapped
|
||||||
, python3
|
, python3
|
||||||
, version
|
, version
|
||||||
, darwin
|
, libobjc
|
||||||
|
, xpc
|
||||||
|
, Foundation
|
||||||
|
, bootstrap_cmds
|
||||||
|
, Carbon
|
||||||
|
, Cocoa
|
||||||
, lit
|
, lit
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
}:
|
}:
|
||||||
|
@ -20,7 +25,7 @@ stdenv.mkDerivation (rec {
|
||||||
pname = "lldb";
|
pname = "lldb";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch pname "1vlyg015dyng43xqb8cg2l6r9ix8klibxsajazbfnckdnh54hwxj";
|
src = fetch pname "077fli9l0fg4kpa5l9vrj810s13ajs15d745lg4l8kmjkbw7p3yh";
|
||||||
|
|
||||||
patches = [ ./lldb-procfs.patch ];
|
patches = [ ./lldb-procfs.patch ];
|
||||||
|
|
||||||
|
@ -35,12 +40,12 @@ stdenv.mkDerivation (rec {
|
||||||
llvm
|
llvm
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.isDarwin [
|
||||||
darwin.libobjc
|
libobjc
|
||||||
darwin.apple_sdk.libs.xpc
|
xpc
|
||||||
darwin.apple_sdk.frameworks.Foundation
|
Foundation
|
||||||
darwin.bootstrap_cmds
|
bootstrap_cmds
|
||||||
darwin.apple_sdk.frameworks.Carbon
|
Carbon
|
||||||
darwin.apple_sdk.frameworks.Cocoa
|
Cocoa
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
@ -81,9 +86,8 @@ stdenv.mkDerivation (rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [];
|
propagatedBuildInputs = [];
|
||||||
|
# manually install lldb man page
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
# manually install lldb man page
|
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
install docs/man/lldb.1 -t $out/share/man/man1/
|
install docs/man/lldb.1 -t $out/share/man/man1/
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec {
|
||||||
pname = "llvm";
|
pname = "llvm";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch pname "199yq3a214avcbi4kk2q0ajriifkvsr0l2dkx3a666m033ihi1ff";
|
src = fetch pname "1lpdkndjb8cxpcyjv9glqp58687j8y8cvd7r72pw6sbqkkzq86g5";
|
||||||
polly_src = fetch "polly" "031r23ijhx7v93a5n33m2nc0x9xyqmx0d8xg80z7q971p6qd63sq";
|
polly_src = fetch "polly" "002a8q3lgspvqdb8fi09cl11x438x6a2d2sb026jargrx92i5vas";
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
unpackFile $src
|
unpackFile $src
|
||||||
|
@ -69,6 +69,9 @@ in stdenv.mkDerivation (rec {
|
||||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||||
--replace "Path.cpp" ""
|
--replace "Path.cpp" ""
|
||||||
rm unittests/Support/Path.cpp
|
rm unittests/Support/Path.cpp
|
||||||
|
substituteInPlace unittests/IR/CMakeLists.txt \
|
||||||
|
--replace "PassBuilderCallbacksTest.cpp" ""
|
||||||
|
rm unittests/IR/PassBuilderCallbacksTest.cpp
|
||||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||||
patch -p1 -i ${../TLI-musl.patch}
|
patch -p1 -i ${../TLI-musl.patch}
|
||||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||||
|
@ -122,11 +125,11 @@ in stdenv.mkDerivation (rec {
|
||||||
"-DCAN_TARGET_i386=false"
|
"-DCAN_TARGET_i386=false"
|
||||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
"-DCMAKE_CROSSCOMPILING=True"
|
"-DCMAKE_CROSSCOMPILING=True"
|
||||||
"-DLLVM_TABLEGEN=${buildPackages.llvm_11}/bin/llvm-tblgen"
|
"-DLLVM_TABLEGEN=${buildPackages.llvm_12}/bin/llvm-tblgen"
|
||||||
];
|
];
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
rm -fR $out
|
rm -R $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
|
@ -171,8 +174,6 @@ in stdenv.mkDerivation (rec {
|
||||||
make docs-llvm-man
|
make docs-llvm-man
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make -C docs install
|
make -C docs install
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||||
pname = "openmp";
|
pname = "openmp";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
|
src = fetch pname "0kw1g7ndvwi0g7lx5d55mp81h9vffxz820l9r2wjdvvfs3dsyq05";
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Fix compilation on aarch64-darwin, remove after the next release.
|
# Fix compilation on aarch64-darwin, remove after the next release.
|
||||||
|
|
|
@ -9926,6 +9926,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
clang_12 = llvmPackages_12.clang;
|
||||||
clang_11 = llvmPackages_11.clang;
|
clang_11 = llvmPackages_11.clang;
|
||||||
clang_10 = llvmPackages_10.clang;
|
clang_10 = llvmPackages_10.clang;
|
||||||
clang_9 = llvmPackages_9.clang;
|
clang_9 = llvmPackages_9.clang;
|
||||||
|
@ -10803,6 +10804,7 @@ in
|
||||||
lld_9 = llvmPackages_9.lld;
|
lld_9 = llvmPackages_9.lld;
|
||||||
lld_10 = llvmPackages_10.lld;
|
lld_10 = llvmPackages_10.lld;
|
||||||
lld_11 = llvmPackages_11.lld;
|
lld_11 = llvmPackages_11.lld;
|
||||||
|
lld_12 = llvmPackages_12.lld;
|
||||||
|
|
||||||
lldb = llvmPackages_latest.lldb;
|
lldb = llvmPackages_latest.lldb;
|
||||||
lldb_5 = llvmPackages_5.lldb;
|
lldb_5 = llvmPackages_5.lldb;
|
||||||
|
@ -10812,10 +10814,12 @@ in
|
||||||
lldb_9 = llvmPackages_9.lldb;
|
lldb_9 = llvmPackages_9.lldb;
|
||||||
lldb_10 = llvmPackages_10.lldb;
|
lldb_10 = llvmPackages_10.lldb;
|
||||||
lldb_11 = llvmPackages_11.lldb;
|
lldb_11 = llvmPackages_11.lldb;
|
||||||
|
lldb_12 = llvmPackages_12.lldb;
|
||||||
|
|
||||||
llvm = llvmPackages.llvm;
|
llvm = llvmPackages.llvm;
|
||||||
llvm-manpages = llvmPackages.llvm-manpages;
|
llvm-manpages = llvmPackages.llvm-manpages;
|
||||||
|
|
||||||
|
llvm_12 = llvmPackages_12.llvm;
|
||||||
llvm_11 = llvmPackages_11.llvm;
|
llvm_11 = llvmPackages_11.llvm;
|
||||||
llvm_10 = llvmPackages_10.llvm;
|
llvm_10 = llvmPackages_10.llvm;
|
||||||
llvm_9 = llvmPackages_9.llvm;
|
llvm_9 = llvmPackages_9.llvm;
|
||||||
|
@ -10880,6 +10884,14 @@ in
|
||||||
stdenv = gcc7Stdenv;
|
stdenv = gcc7Stdenv;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
llvmPackages_12 = callPackage ../development/compilers/llvm/12 ({
|
||||||
|
inherit (stdenvAdapters) overrideCC;
|
||||||
|
buildLlvmTools = buildPackages.llvmPackages_12.tools;
|
||||||
|
targetLlvmLibraries = targetPackages.llvmPackages_12.libraries;
|
||||||
|
} // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) {
|
||||||
|
stdenv = gcc7Stdenv;
|
||||||
|
});
|
||||||
|
|
||||||
llvmPackages_latest = llvmPackages_11;
|
llvmPackages_latest = llvmPackages_11;
|
||||||
|
|
||||||
llvmPackages_rocm = recurseIntoAttrs (callPackage ../development/compilers/llvm/rocm { });
|
llvmPackages_rocm = recurseIntoAttrs (callPackage ../development/compilers/llvm/rocm { });
|
||||||
|
|
Loading…
Reference in a new issue