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:32:46 +02:00 committed by Michael Weiss
parent 28f2797a81
commit 0a8334d5a0
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83
14 changed files with 37 additions and 145 deletions

@ -1,53 +0,0 @@
Index: lib/Driver/ToolChains/BareMetal.cpp
===================================================================
--- a/lib/Driver/ToolChains/BareMetal.cpp
+++ b/lib/Driver/ToolChains/BareMetal.cpp
@@ -157,7 +157,7 @@
void BareMetal::AddLinkRuntimeLib(const ArgList &Args,
ArgStringList &CmdArgs) const {
CmdArgs.push_back(Args.MakeArgString("-lclang_rt.builtins-" +
- getTriple().getArchName() + ".a"));
+ getTriple().getArchName()));
}
void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
Index: test/Driver/baremetal.cpp
===================================================================
--- a/test/Driver/baremetal.cpp
+++ b/test/Driver/baremetal.cpp
@@ -13,7 +13,7 @@
// CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
// CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal"
// CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for"
-// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
+// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
// CHECK-V6M-C-SAME: "-o" "{{.*}}.o"
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -35,7 +35,7 @@
// CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
// CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
// CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
-// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
+// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
// CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o"
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -48,7 +48,7 @@
// CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
// CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
// CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
-// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
+// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
// CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o"
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -61,7 +61,7 @@
// CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
// CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
// CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind"
-// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
+// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
// CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o"
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \

@ -8,7 +8,7 @@ let
pname = "clang";
inherit version;
src = fetch "clang" "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr";
src = fetch "clang" "0jfgxn0xck73zgv3kral27ccynchfwiqg6b4r1r39wzfzm8drb0f";
unpackPhase = ''
unpackFile $src
@ -27,7 +27,6 @@ let
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
] ++ stdenv.lib.optionals enableManpages [
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
@ -39,7 +38,6 @@ let
patches = [
./purity.patch
# https://reviews.llvm.org/D51899
./compiler-rt-baremetal.patch
];
postPatch = ''
@ -87,6 +85,8 @@ let
passthru = {
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
};
meta = {

@ -11,20 +11,18 @@ diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index fe3c0191bb..c6a482bece 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -487,12 +487,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (!IsStatic) {
if (Args.hasArg(options::OPT_rdynamic))
CmdArgs.push_back("-export-dynamic");
-
- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
- const std::string Loader =
- D.DyldPrefix + ToolChain.getDynamicLinker(Args);
- CmdArgs.push_back("-dynamic-linker");
- CmdArgs.push_back(Args.MakeArgString(Loader));
- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
- ToolChain.getDynamicLinker(Args)));
- }
}
CmdArgs.push_back("-o");
--
2.11.0

@ -11,7 +11,7 @@ in
stdenv.mkDerivation rec {
pname = "compiler-rt";
inherit version;
src = fetch pname "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr";
src = fetch pname "050p46f37cz4a8rzhjnq3lyfvii2790spkcrr3b79yrcwzbym1n6";
nativeBuildInputs = [ cmake python3 llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@ -47,7 +47,6 @@ stdenv.mkDerivation rec {
patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./find-darwin-sdk-version.patch # don't test for macOS being >= 10.15
]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;

@ -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
];

@ -1,62 +0,0 @@
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:13:55.000000000 +0100
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:19:37.000000000 +0100
@@ -43,41 +43,6 @@
set(DARWIN_${sdk_name}_CACHED_SYSROOT ${var_internal} CACHE STRING "Darwin SDK path for SDK ${sdk_name}." FORCE)
endfunction()
-function(find_darwin_sdk_version var sdk_name)
- # We deliberately don't cache the result here because
- # CMake's caching causes too many problems.
- set(result_process 1)
- if(NOT DARWIN_PREFER_PUBLIC_SDK)
- # Let's first try the internal SDK, otherwise use the public SDK.
- execute_process(
- COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-version
- RESULT_VARIABLE result_process
- OUTPUT_VARIABLE var_internal
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_FILE /dev/null
- )
- endif()
- if((NOT ${result_process} EQUAL 0) OR "" STREQUAL "${var_internal}")
- execute_process(
- COMMAND xcrun --sdk ${sdk_name} --show-sdk-version
- RESULT_VARIABLE result_process
- OUTPUT_VARIABLE var_internal
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_FILE /dev/null
- )
- endif()
- if(NOT result_process EQUAL 0)
- message(FATAL_ERROR
- "Failed to determine SDK version for \"${sdk_name}\" SDK")
- endif()
- # Check reported version looks sane.
- if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$")
- message(FATAL_ERROR
- "Reported SDK version \"${var_internal}\" does not look like a version")
- endif()
- set(${var} ${var_internal} PARENT_SCOPE)
-endfunction()
-
# There isn't a clear mapping of what architectures are supported with a given
# target platform, but ld's version output does list the architectures it can
# link for.
@@ -119,17 +84,6 @@
foreach(flag ${DARWIN_${os}_LINK_FLAGS})
set(os_linker_flags "${os_linker_flags} ${flag}")
endforeach()
-
- # Disable building for i386 for macOS SDK >= 10.15. The SDK doesn't support
- # linking for i386 and the corresponding OS doesn't allow running macOS i386
- # binaries.
- if ("${os}" STREQUAL "osx")
- find_darwin_sdk_version(macosx_sdk_version "macosx")
- if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
- message(STATUS "Disabling i386 slice for ${valid_archs}")
- list(REMOVE_ITEM archs "i386")
- endif()
- endif()
endif()
# The simple program will build for x86_64h on the simulator because it is

@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++";
inherit version;
src = fetch "libcxx" "0v78bfr6h2zifvdqnj2wlfk4pvxzrqn3hg1v6lqk3y12bx9p9xny";
src = fetch "libcxx" "0rxqix45gwwfc98gfrx3jbhhp24la3i47lagqv0g0lg7sdw8vmn4";
postUnpack = ''
unpackFile ${libcxxabi.src}

@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
src = fetch "libcxxabi" "0yqs722y76cwvmfsq0lb917r9m3fci7bf5z3yzl71yz9n88ghzm9";
src = fetch "libcxxabi" "1hz19nmxi3kjz5fjf51v80aji7r609ckjzw759yxwjrwkxx48lhx";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch pname "09syx66idnm2pr46x2vmk0jn3iwdv0lkd04xy4zjbwmz3vn066bl";
src = fetch pname "0qras7ls393pc8zmm4qkpw0vkarkf5i5281s9pfbnc90dmnv4x69";
nativeBuildInputs = [ cmake ];

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "lld";
inherit version;
src = fetch pname "0ynzi35r4fckvp6842alpd43qr810j3728yfslc66fk2mbh4j52r";
src = fetch pname "0g5w88mpa0ppfajxdpbqi5dzrxw6c22hzjmljv0kn93kmiwdrjcy";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];

@ -20,7 +20,7 @@ stdenv.mkDerivation (rec {
pname = "lldb";
inherit version;
src = fetch pname "051p5b04y6z3g730rmc2n2v71lipbw7k69riww3a6sl74myfiaq7";
src = fetch pname "1vzbfb356psrcczx9a5g29pic4qr6vmbdbrsyaakl6q2ax0prkvh";
patches = [ ./lldb-procfs.patch ];

@ -18,7 +18,7 @@
|| stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
|| stdenv.isAarch32 # broken for the armv7l builder
)
, enablePolly ? true
, enablePolly ? false
}:
let
@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
src = fetch pname "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65";
polly_src = fetch "polly" "0nm2d8niz47yjsa3r17v3p13b70igkd338ib8191znr1dfw0pyyj";
src = fetch pname "11nym1bycy2ynr3z9frifbhqf82jjby2jk4xni6kx9zdqxjfz7q3";
polly_src = fetch "polly" "1zq14njfmxgyncy8lwwm72l4338m3q3hwl5gnl4732cc1daaxvyh";
unpackPhase = ''
unpackFile $src
@ -81,7 +81,6 @@ in stdenv.mkDerivation (rec {
rm test/DebugInfo/X86/convert-debugloc.ll
rm test/DebugInfo/X86/convert-inlined.ll
rm test/DebugInfo/X86/convert-linked.ll
rm test/DebugInfo/X86/debug_addr.ll
rm test/tools/dsymutil/X86/op-convert.test
'' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
# Seems to require certain floating point hardware (NEON?)

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi";
src = fetch pname "1qg6chhfhp0fv9k5vzmqbn14snbzwh3y6810a60mk77m4jlijnbc";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

@ -8373,6 +8373,7 @@ in
};
};
clang_11 = llvmPackages_11.clang;
clang_10 = llvmPackages_10.clang;
clang_9 = llvmPackages_9.clang;
clang_8 = llvmPackages_8.clang;
@ -9187,6 +9188,7 @@ in
lld_8 = llvmPackages_8.lld;
lld_9 = llvmPackages_9.lld;
lld_10 = llvmPackages_10.lld;
lld_11 = llvmPackages_11.lld;
lldb = llvmPackages.lldb;
lldb_5 = llvmPackages_5.lldb;
@ -9195,10 +9197,12 @@ in
lldb_8 = llvmPackages_8.lldb;
lldb_9 = llvmPackages_9.lldb;
lldb_10 = llvmPackages_10.lldb;
lldb_11 = llvmPackages_11.lldb;
llvm = llvmPackages.llvm;
llvm-manpages = llvmPackages.llvm-manpages;
llvm_11 = llvmPackages_11.llvm;
llvm_10 = llvmPackages_10.llvm;
llvm_9 = llvmPackages_9.llvm;
llvm_8 = llvmPackages_8.llvm;
@ -9244,6 +9248,14 @@ in
targetLlvmLibraries = targetPackages.llvmPackages_10.libraries;
};
llvmPackages_11 = callPackage ../development/compilers/llvm/11 ({
inherit (stdenvAdapters) overrideCC;
buildLlvmTools = buildPackages.llvmPackages_11.tools;
targetLlvmLibraries = targetPackages.llvmPackages_11.libraries;
} // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) {
stdenv = gcc7Stdenv;
});
llvmPackages_latest = llvmPackages_10;
llvmPackages_rocm = callPackage ../development/compilers/llvm/rocm { };