Merge remote-tracking branch 'upstream/master' into gcc-8

This commit is contained in:
Robin Gloster
2019-08-25 18:55:46 +02:00
5048 changed files with 266048 additions and 268080 deletions
@@ -4,8 +4,10 @@ let
in stdenv.mkDerivation {
name = "clang-${version}";
src = fetch "cfe" "0846h8vn3zlc00jkmvrmy88gc6ql6014c02l4jv78fpvfigmgssg";
unpackPhase = ''
unpackFile ${fetch "cfe" "0846h8vn3zlc00jkmvrmy88gc6ql6014c02l4jv78fpvfigmgssg"}
unpackFile $src
mv cfe-${version}.src clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+4 -6
View File
@@ -17,13 +17,13 @@
, enableSharedLibraries ? !stdenv.isDarwin
}:
let
src = fetch "llvm" "0xf5q17kkxsrm2gsi93h4pwlv663kji73r2g4asb97klsmb626a4";
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "llvm-${version}";
src = fetch "llvm" "0xf5q17kkxsrm2gsi93h4pwlv663kji73r2g4asb97klsmb626a4";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}.src llvm
sourceRoot=$PWD/llvm
unpackFile ${compiler-rt_src}
@@ -85,8 +85,6 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
@@ -5,8 +5,10 @@ let
self = stdenv.mkDerivation {
name = "clang-${version}";
src = fetch "cfe" "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc";
unpackPhase = ''
unpackFile ${fetch "cfe" "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc"}
unpackFile $src
mv cfe-${version}.src clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+4 -6
View File
@@ -16,13 +16,13 @@
, enableSharedLibraries ? true
}:
let
src = fetch "llvm" "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf";
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "llvm-${version}";
src = fetch "llvm" "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}.src llvm
sourceRoot=$PWD/llvm
unpackFile ${compiler-rt_src}
@@ -105,8 +105,6 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
@@ -5,8 +5,10 @@ let
self = stdenv.mkDerivation {
name = "clang-${version}";
src = fetch "cfe" "0qsyyb40iwifhhlx9a3drf8z6ni6zwyk3bvh0kx2gs6yjsxwxi76";
unpackPhase = ''
unpackFile ${fetch "cfe" "0qsyyb40iwifhhlx9a3drf8z6ni6zwyk3bvh0kx2gs6yjsxwxi76"}
unpackFile $src
mv cfe-${version}.src clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+3 -5
View File
@@ -20,8 +20,6 @@
assert (stdenv.hostPlatform != stdenv.buildPlatform) -> !enableSharedLibraries;
let
src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z";
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." version; in
@@ -31,8 +29,10 @@ in
stdenv.mkDerivation {
name = "llvm-${version}";
src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}.src llvm
sourceRoot=$PWD/llvm
unpackFile ${compiler-rt_src}
@@ -163,8 +163,6 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
@@ -8,8 +8,10 @@ let
self = stdenv.mkDerivation ({
name = "clang-${version}";
src = fetch "cfe" "16vnv3msnvx33dydd17k2cq0icndi1a06bg5vcxkrhjjb1rqlwv1";
unpackPhase = ''
unpackFile ${fetch "cfe" "16vnv3msnvx33dydd17k2cq0icndi1a06bg5vcxkrhjjb1rqlwv1"}
unpackFile $src
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+1 -1
View File
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
+3 -5
View File
@@ -17,8 +17,6 @@
}:
let
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
@@ -28,8 +26,10 @@ in
stdenv.mkDerivation (rec {
name = "llvm-${version}";
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}* llvm
sourceRoot=$PWD/llvm
unpackFile ${compiler-rt_src}
@@ -150,8 +150,6 @@ stdenv.mkDerivation (rec {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
@@ -8,8 +8,10 @@ let
self = stdenv.mkDerivation ({
name = "clang-${version}";
src = fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s";
unpackPhase = ''
unpackFile ${fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s"}
unpackFile $src
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+1 -1
View File
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
+3 -6
View File
@@ -10,15 +10,12 @@
, version
, release_version
, zlib
, libcxxabi
, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? !enableManpages
}:
let
src = fetch "llvm" "0g1bbj2n6xv4p1n6hh17vj3vpvg56wacipc81dgwga9mg2lys8nm";
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
@@ -28,8 +25,10 @@ in
stdenv.mkDerivation (rec {
name = "llvm-${version}";
src = fetch "llvm" "0g1bbj2n6xv4p1n6hh17vj3vpvg56wacipc81dgwga9mg2lys8nm";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}* llvm
sourceRoot=$PWD/llvm
'';
@@ -141,8 +140,6 @@ stdenv.mkDerivation (rec {
enableParallelBuilding = true;
passthru.src = src;
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
@@ -8,8 +8,10 @@ let
self = stdenv.mkDerivation ({
name = "clang-${version}";
src = fetch "cfe" "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w";
unpackPhase = ''
unpackFile ${fetch "cfe" "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"}
unpackFile $src
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+1 -1
View File
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
+3 -5
View File
@@ -19,8 +19,6 @@
let
inherit (stdenv.lib) optional optionals optionalString;
src = fetch "llvm" "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn";
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
@@ -30,8 +28,10 @@ in
stdenv.mkDerivation (rec {
name = "llvm-${version}";
src = fetch "llvm" "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}* llvm
sourceRoot=$PWD/llvm
'';
@@ -146,8 +146,6 @@ stdenv.mkDerivation (rec {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
@@ -8,8 +8,10 @@ let
self = stdenv.mkDerivation ({
name = "clang-${version}";
src = fetch "cfe" "0vc4i87qwxnw9lci4ayws9spakg0z6w5w670snj9f8g5m9rc8zg9";
unpackPhase = ''
unpackFile ${fetch "cfe" "0vc4i87qwxnw9lci4ayws9spakg0z6w5w670snj9f8g5m9rc8zg9"}
unpackFile $src
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
+14 -9
View File
@@ -9,6 +9,7 @@
, libxml2
, llvm
, clang-unwrapped
, perl
, python
, version
, darwin
@@ -19,6 +20,11 @@ stdenv.mkDerivation {
src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v";
nativeBuildInputs = [ cmake perl python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
postPatch = ''
# Fix up various paths that assume llvm and clang are installed in the same place
sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
@@ -30,22 +36,21 @@ stdenv.mkDerivation {
sed -i -e 's,message(SEND_ERROR "Cannot find debugserver on system."),,' \
-e 's,string(STRIP ''${XCODE_DEV_DIR} XCODE_DEV_DIR),,' \
tools/debugserver/source/CMakeLists.txt
# Fix /usr/bin references for sandboxed builds.
patchShebangs scripts
'';
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2";
cmakeFlags = [
"-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
"-DSKIP_DEBUGSERVER=ON"
];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2";
enableParallelBuilding = true;
postInstall = ''
+8 -8
View File
@@ -15,16 +15,15 @@
, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? true
, enablePFM ? !stdenv.isDarwin
, enablePFM ? !(stdenv.isDarwin
|| stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
)
, enablePolly ? false
}:
let
inherit (stdenv.lib) optional optionals optionalString;
src = fetch "llvm" "0r1p5didv4rkgxyvbkyz671xddg6i3dxvbpsi1xxipkla0l9pk0v";
polly_src = fetch "polly" "16qkns4ab4x0azrvhy4j7cncbyb2rrbdrqj87zphvqxm5pvm8m1h";
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
@@ -33,12 +32,15 @@ let
in stdenv.mkDerivation (rec {
name = "llvm-${version}";
src = fetch "llvm" "0r1p5didv4rkgxyvbkyz671xddg6i3dxvbpsi1xxipkla0l9pk0v";
polly_src = fetch "polly" "16qkns4ab4x0azrvhy4j7cncbyb2rrbdrqj87zphvqxm5pvm8m1h";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}* llvm
sourceRoot=$PWD/llvm
'' + optionalString enablePolly ''
unpackFile ${polly_src}
unpackFile $polly_src
mv polly-* $sourceRoot/tools/polly
'';
@@ -162,8 +164,6 @@ in stdenv.mkDerivation (rec {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
@@ -0,0 +1,53 @@
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 \
@@ -1,4 +1,4 @@
{ stdenv, fetch, fetchpatch, cmake, libxml2, llvm, version, clang-tools-extra_src, python
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python
, fixDarwinDylibNames
, enableManpages ? false
, enablePolly ? false # TODO: get this info from llvm (passthru?)
@@ -8,8 +8,10 @@ let
self = stdenv.mkDerivation ({
name = "clang-${version}";
src = fetch "cfe" "0ihnbdl058gvl2wdy45p5am55bq8ifx8m9mhcsgj9ax8yxlzvvvh";
unpackPhase = ''
unpackFile ${fetch "cfe" "0svk1f70hvpwrjp6x5i9kqwrqwxnmcrw5s7f4cxyd100mdd12k08"}
unpackFile $src
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
@@ -45,6 +47,8 @@ let
# Backport for the `--unwindlib=[libgcc|compiler-rt]` flag, which is
# needed for our bootstrapping to not interfere with C.
./unwindlib.patch
# https://reviews.llvm.org/D51899
./compiler-rt-baremetal.patch
];
postPatch = ''
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
name = "compiler-rt-${version}";
inherit version;
src = fetch "compiler-rt" "1c919wsm17xnv7lr8bhpq2wkq8113lzlw6hzhfr737j59x3wfddl";
src = fetch "compiler-rt" "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi";
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@@ -27,6 +27,9 @@ stdenv.mkDerivation rec {
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ stdenv.lib.optionals (stdenv.hostPlatform.parsed.kernel.name == "none") [
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
"-DCOMPILER_RT_OS_DIR=baremetal"
];
outputs = [ "out" "dev" ];
@@ -5,15 +5,15 @@
}:
let
release_version = "8.0.0";
release_version = "8.0.1";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "0jwx6nnshp92pd5852y7ip7qhaqdf8az5g0440pli9q8whmi402g";
clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; });
@@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetch "libcxx" "1qlx3wlxrnc5cwc1fcfc2vhfsl7j4294hi8y5kxj8hy8wxsjd462";
src = fetch "libcxx" "0y4vc9z36c1zlq15cnibdzxnc1xi5glbc6klnm8a41q3db4541kz";
postUnpack = ''
unpackFile ${libcxxabi.src}
@@ -4,7 +4,7 @@
stdenv.mkDerivation {
name = "libc++abi-${version}";
src = fetch "libcxxabi" "1k875f977ybdkpdnr9105wa6hccy9qvpd9xd42n75h7p56bdxmn2";
src = fetch "libcxxabi" "1vznz8n1z1h8af0ga451m98lc2hjnv4fyzl71napsvjhvk4g6nxp";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
@@ -1,9 +1,9 @@
{ stdenv, version, fetch, cmake, libcxx, fetchpatch }:
{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
stdenv.mkDerivation {
name = "libunwind-${version}";
src = fetch "libunwind" "0q7ndlldid9wchnny0a936llwxj7zgb9gxp46wjjxvwwkik3l97z";
src = fetch "libunwind" "0vhgcgzsb33l83qaikrkj87ypqb48mi607rccczccwiiv8ficw0q";
nativeBuildInputs = [ cmake ];
@@ -19,4 +19,6 @@ stdenv.mkDerivation {
];
enableParallelBuilding = true;
cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
}
+1 -1
View File
@@ -9,7 +9,7 @@
stdenv.mkDerivation {
name = "lld-${version}";
src = fetch "lld" "0dvf38pbm7jy88g66mz7ikkdfhm2qpj0iyzh62hzycifjbnciblw";
src = fetch "lld" "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];
+2 -2
View File
@@ -17,7 +17,7 @@
stdenv.mkDerivation {
name = "lldb-${version}";
src = fetch "lldb" "0wq3mi76fk86g2g2bcsr0yhagh1dlf2myk641ai58rc116gqp4a9";
src = fetch "lldb" "1mriw4adrwm6kzabrjr7yqmdiylxd6glf6samd80dp8idnm9p9z8";
postPatch = ''
# Fix up various paths that assume llvm and clang are installed in the same place
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ];
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
+8 -9
View File
@@ -1,6 +1,5 @@
{ stdenv
, fetch
, fetchpatch
, cmake
, python
, libffi
@@ -15,16 +14,15 @@
, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? true
, enablePFM ? !stdenv.isDarwin
, enablePFM ? !(stdenv.isDarwin
|| stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
)
, enablePolly ? false
}:
let
inherit (stdenv.lib) optional optionals optionalString;
src = fetch "llvm" "0k124sxkfhfi1rca6kzkdraf4axhx99x3cw2rk55056628dvwwl8";
polly_src = fetch "polly" "1x4xv3j226rqdddp7b61d71wsx2b8vmmri02ycx27y2fg7ba7xg3";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 1 (splitString "." release_version));
@@ -32,12 +30,15 @@ let
in stdenv.mkDerivation (rec {
name = "llvm-${version}";
src = fetch "llvm" "1rvm5gqp5v8hfn17kqws3zhk94w4kxndal12bqa0y57p09nply24";
polly_src = fetch "polly" "1lfjdz3ilj5xmjxvicd8f5ykybks67ry2pdb777352r3mzlgg8g8";
unpackPhase = ''
unpackFile ${src}
unpackFile $src
mv llvm-${version}* llvm
sourceRoot=$PWD/llvm
'' + optionalString enablePolly ''
unpackFile ${polly_src}
unpackFile $polly_src
mv polly-* $sourceRoot/tools/polly
'';
@@ -141,8 +142,6 @@ in stdenv.mkDerivation (rec {
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
+1 -1
View File
@@ -9,7 +9,7 @@
stdenv.mkDerivation {
name = "openmp-${version}";
src = fetch "openmp" "1mf9cpgvix34xlpv0inkgl3qmdvgvp96f7sksqizri0n5xfp1cgp";
src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];