diff options
author | Robin Gloster <mail@glob.in> | 2019-08-25 18:55:46 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2019-08-25 18:55:46 +0200 |
commit | 616b8343c4c384f651f51d8c9b8e96239e1113d0 (patch) | |
tree | c6894ea5e950e373bcf8c8e8948fb2a7d4716565 /pkgs/development/compilers/llvm | |
parent | 45d6ccea3357c65135b985f2eebf88020ca6461e (diff) | |
parent | 48191315aa2e34643203dbfc5ae8bd84c1cafe54 (diff) | |
download | nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.tar nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.tar.gz nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.tar.bz2 nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.tar.lz nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.tar.xz nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.tar.zst nixlib-616b8343c4c384f651f51d8c9b8e96239e1113d0.zip |
Merge remote-tracking branch 'upstream/master' into gcc-8
Diffstat (limited to 'pkgs/development/compilers/llvm')
29 files changed, 149 insertions, 82 deletions
diff --git a/pkgs/development/compilers/llvm/3.5/clang.nix b/pkgs/development/compilers/llvm/3.5/clang.nix index 7e0163577baf..132cd67a4aeb 100644 --- a/pkgs/development/compilers/llvm/3.5/clang.nix +++ b/pkgs/development/compilers/llvm/3.5/clang.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/3.5/llvm.nix b/pkgs/development/compilers/llvm/3.5/llvm.nix index 2645469767ad..6eec99717785 100644 --- a/pkgs/development/compilers/llvm/3.5/llvm.nix +++ b/pkgs/development/compilers/llvm/3.5/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/3.8/clang/default.nix b/pkgs/development/compilers/llvm/3.8/clang/default.nix index cc25a41b0400..47a1bed126da 100644 --- a/pkgs/development/compilers/llvm/3.8/clang/default.nix +++ b/pkgs/development/compilers/llvm/3.8/clang/default.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix index 261a1d0f94ca..a73b73137ddc 100644 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ b/pkgs/development/compilers/llvm/3.8/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/3.9/clang/default.nix b/pkgs/development/compilers/llvm/3.9/clang/default.nix index f597c559dba6..e2cf437e19e1 100644 --- a/pkgs/development/compilers/llvm/3.9/clang/default.nix +++ b/pkgs/development/compilers/llvm/3.9/clang/default.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index 174cb17908cc..c8d819cc9634 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/4/clang/default.nix b/pkgs/development/compilers/llvm/4/clang/default.nix index c6538282f23e..f50da39a6249 100644 --- a/pkgs/development/compilers/llvm/4/clang/default.nix +++ b/pkgs/development/compilers/llvm/4/clang/default.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/4/lldb.nix b/pkgs/development/compilers/llvm/4/lldb.nix index 0be8a4d41865..325149fc19be 100644 --- a/pkgs/development/compilers/llvm/4/lldb.nix +++ b/pkgs/development/compilers/llvm/4/lldb.nix @@ -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" ]; diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index ecb18a580540..ea70382d2ac7 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index 5fd0271f0261..7a3b151f8358 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/5/lldb.nix b/pkgs/development/compilers/llvm/5/lldb.nix index 7be9a7e47b74..5e670d4de159 100644 --- a/pkgs/development/compilers/llvm/5/lldb.nix +++ b/pkgs/development/compilers/llvm/5/lldb.nix @@ -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" ]; diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix index b742e6863a5e..8f311efaca5e 100644 --- a/pkgs/development/compilers/llvm/5/llvm.nix +++ b/pkgs/development/compilers/llvm/5/llvm.nix @@ -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"; diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix index 840567496785..ff9064f455ec 100644 --- a/pkgs/development/compilers/llvm/6/clang/default.nix +++ b/pkgs/development/compilers/llvm/6/clang/default.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/6/lldb.nix b/pkgs/development/compilers/llvm/6/lldb.nix index d33de2488350..9571e7ab5a63 100644 --- a/pkgs/development/compilers/llvm/6/lldb.nix +++ b/pkgs/development/compilers/llvm/6/lldb.nix @@ -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" ]; diff --git a/pkgs/development/compilers/llvm/6/llvm.nix b/pkgs/development/compilers/llvm/6/llvm.nix index 9237d442b776..e104d051fed7 100644 --- a/pkgs/development/compilers/llvm/6/llvm.nix +++ b/pkgs/development/compilers/llvm/6/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index a4877b3fe6f5..e49c8387f7ef 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -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} diff --git a/pkgs/development/compilers/llvm/7/lldb.nix b/pkgs/development/compilers/llvm/7/lldb.nix index f58871f1d7cd..1b2dff2c76cf 100644 --- a/pkgs/development/compilers/llvm/7/lldb.nix +++ b/pkgs/development/compilers/llvm/7/lldb.nix @@ -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 ]; + 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"; - cmakeFlags = [ - "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic - "-DSKIP_DEBUGSERVER=ON" - ]; - enableParallelBuilding = true; postInstall = '' diff --git a/pkgs/development/compilers/llvm/7/llvm.nix b/pkgs/development/compilers/llvm/7/llvm.nix index d3d9a4c506de..a9caa88141a6 100644 --- a/pkgs/development/compilers/llvm/7/llvm.nix +++ b/pkgs/development/compilers/llvm/7/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch b/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch new file mode 100644 index 000000000000..a4a0f21b0fcd --- /dev/null +++ b/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch @@ -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 \ diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index c0a0e0851450..6911089250e8 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -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 = '' diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index a8bbb1f719bf..5959b99316d9 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix @@ -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" ]; diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix index 48cf9e5e589c..f864e24acfef 100644 --- a/pkgs/development/compilers/llvm/8/default.nix +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -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; }); diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix index 3d67c37dcdd7..f8a07de07222 100644 --- a/pkgs/development/compilers/llvm/8/libc++/default.nix +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "libc++-${version}"; - src = fetch "libcxx" "1qlx3wlxrnc5cwc1fcfc2vhfsl7j4294hi8y5kxj8hy8wxsjd462"; + src = fetch "libcxx" "0y4vc9z36c1zlq15cnibdzxnc1xi5glbc6klnm8a41q3db4541kz"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/8/libc++abi.nix b/pkgs/development/compilers/llvm/8/libc++abi.nix index bb5b368267f2..1ee6d069f4b5 100644 --- a/pkgs/development/compilers/llvm/8/libc++abi.nix +++ b/pkgs/development/compilers/llvm/8/libc++abi.nix @@ -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; diff --git a/pkgs/development/compilers/llvm/8/libunwind.nix b/pkgs/development/compilers/llvm/8/libunwind.nix index a187d0adc994..75edd1fff54d 100644 --- a/pkgs/development/compilers/llvm/8/libunwind.nix +++ b/pkgs/development/compilers/llvm/8/libunwind.nix @@ -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"; } diff --git a/pkgs/development/compilers/llvm/8/lld.nix b/pkgs/development/compilers/llvm/8/lld.nix index 7fff6843c5f4..aec1b14b9943 100644 --- a/pkgs/development/compilers/llvm/8/lld.nix +++ b/pkgs/development/compilers/llvm/8/lld.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { name = "lld-${version}"; - src = fetch "lld" "0dvf38pbm7jy88g66mz7ikkdfhm2qpj0iyzh62hzycifjbnciblw"; + src = fetch "lld" "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz"; nativeBuildInputs = [ cmake ]; buildInputs = [ llvm libxml2 ]; diff --git a/pkgs/development/compilers/llvm/8/lldb.nix b/pkgs/development/compilers/llvm/8/lldb.nix index ae9198e99d27..f31da000bb82 100644 --- a/pkgs/development/compilers/llvm/8/lldb.nix +++ b/pkgs/development/compilers/llvm/8/lldb.nix @@ -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" ]; diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix index 5d8d08167298..6799a3f935f5 100644 --- a/pkgs/development/compilers/llvm/8/llvm.nix +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -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/; diff --git a/pkgs/development/compilers/llvm/8/openmp.nix b/pkgs/development/compilers/llvm/8/openmp.nix index bf85cae5abe7..8cf551735619 100644 --- a/pkgs/development/compilers/llvm/8/openmp.nix +++ b/pkgs/development/compilers/llvm/8/openmp.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { name = "openmp-${version}"; - src = fetch "openmp" "1mf9cpgvix34xlpv0inkgl3qmdvgvp96f7sksqizri0n5xfp1cgp"; + src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ llvm ]; |