llvm_11: init at 11.0.0rc1

http://lists.llvm.org/pipermail/release-testers/2020-July/001305.html

TODO: Enable Polly.

Co-authored-by: conferno <conferno@camfex.cz>
This commit is contained in:
Gabor Greif
2020-08-25 19:42:12 +02:00
committed by Michael Weiss
co-authored by conferno
parent 28f2797a81
commit 0a8334d5a0
14 changed files with 37 additions and 145 deletions
+9 -10
View File
@@ -1,21 +1,21 @@
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
{ lowPrio, newScope, pkgs, stdenv, cmake
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
, buildPackages
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
}:
let
release_version = "10.0.1";
version = release_version; # differentiating these (variables) is important for RCs
release_version = "11.0.0";
candidate = "rc1";
version = "${release_version}${candidate}"; # differentiating these (variables) is important for RCs
targetConfig = stdenv.targetPlatform.config;
fetch = name: sha256: fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}-${candidate}/${name}-${version}.src.tar.xz";
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh";
clang-tools-extra_src = fetch "clang-tools-extra" "1ja4mdal3ixjhiwwyw7yb1a1abw783drqq0135k9lig1gbfc67q0";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
@@ -25,8 +25,8 @@ let
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
'';
in {
@@ -60,8 +60,7 @@ let
libstdcxxClang = wrapCCWith rec {
cc = tools.clang-unwrapped;
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
libcxx = null;
libcxx = null; # libstdcxx is smuggled in with clang.gcc
extraPackages = [
targetLlvmLibraries.compiler-rt
];