From 7c27d4981556c0a0a5ca9cf0e8eeaf579538883e Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 17 Mar 2021 18:17:32 +0100 Subject: llvmPackages_12: init at 12.0.0-rc3 https://lists.llvm.org/pipermail/release-testers/2021-March/001496.html --- .../compilers/llvm/12/clang/default.nix | 6 +----- pkgs/development/compilers/llvm/12/compiler-rt.nix | 2 +- pkgs/development/compilers/llvm/12/default.nix | 17 ++++++++++----- .../compilers/llvm/12/libc++/default.nix | 2 +- pkgs/development/compilers/llvm/12/libc++abi.nix | 2 +- pkgs/development/compilers/llvm/12/libunwind.nix | 2 +- pkgs/development/compilers/llvm/12/lld.nix | 10 ++++++++- pkgs/development/compilers/llvm/12/lldb.nix | 24 +++++++++++++--------- pkgs/development/compilers/llvm/12/llvm.nix | 13 ++++++------ pkgs/development/compilers/llvm/12/openmp.nix | 2 +- 10 files changed, 48 insertions(+), 32 deletions(-) (limited to 'pkgs/development/compilers/llvm') diff --git a/pkgs/development/compilers/llvm/12/clang/default.nix b/pkgs/development/compilers/llvm/12/clang/default.nix index 2e03112d827..955cfb631f6 100644 --- a/pkgs/development/compilers/llvm/12/clang/default.nix +++ b/pkgs/development/compilers/llvm/12/clang/default.nix @@ -8,7 +8,7 @@ let pname = "clang"; inherit version; - src = fetch "clang" "12sm91qx2m79cvj75a9aazf2x8xybjbd593dv6v7rxficpq8i0ha"; + src = fetch "clang" "1xg2wy86zdj1d4h33n9mmb4j0x8bp9a5pk4qnnx3imlh8n6vhrqj"; inherit clang-tools-extra_src; unpackPhase = '' @@ -16,7 +16,6 @@ let mv clang-* clang sourceRoot=$PWD/clang unpackFile ${clang-tools-extra_src} - mv clang-tools-extra-* $sourceRoot/tools/extra ''; nativeBuildInputs = [ cmake python3 lld ] @@ -50,9 +49,6 @@ let sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt '' + lib.optionalString stdenv.hostPlatform.isMusl '' 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" ]; diff --git a/pkgs/development/compilers/llvm/12/compiler-rt.nix b/pkgs/development/compilers/llvm/12/compiler-rt.nix index c42e07eac4c..4a6f7ea99af 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt.nix @@ -11,7 +11,7 @@ in stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version; - src = fetch pname "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy"; + src = fetch pname "1n4jf0clwj3q0vfc7xjl0k4dqj69fvgsmib8qdqh45imgamnypvb"; nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix index e4d9f45c955..b0ee0b83679 100644 --- a/pkgs/development/compilers/llvm/12/default.nix +++ b/pkgs/development/compilers/llvm/12/default.nix @@ -3,11 +3,12 @@ , buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross +, darwin }: let - release_version = "11.1.0"; - candidate = ""; # empty or "rcN" + release_version = "12.0.0"; + candidate = "rc3"; # empty or "rcN" dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs targetConfig = stdenv.targetPlatform.config; @@ -17,7 +18,7 @@ let 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 callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); @@ -79,9 +80,15 @@ let 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 # fully LLVM toolchain from scratch. No GCC toolchain should be diff --git a/pkgs/development/compilers/llvm/12/libc++/default.nix b/pkgs/development/compilers/llvm/12/libc++/default.nix index 6adb824f539..8f2672cc0d9 100644 --- a/pkgs/development/compilers/llvm/12/libc++/default.nix +++ b/pkgs/development/compilers/llvm/12/libc++/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { pname = "libc++"; inherit version; - src = fetch "libcxx" "1rgqsqpgi0vkga5d7hy0iyfsqgzfz7q1xy7afdfa1snp1qjks8xv"; + src = fetch "libcxx" "1114yvbipwdk1qk1xrb7s05hf7cycyknpf4ph0wbqpjzzzxk0hgk"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/12/libc++abi.nix b/pkgs/development/compilers/llvm/12/libc++abi.nix index d941044ca60..24ef8168fcd 100644 --- a/pkgs/development/compilers/llvm/12/libc++abi.nix +++ b/pkgs/development/compilers/llvm/12/libc++abi.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { pname = "libc++abi"; inherit version; - src = fetch "libcxxabi" "1azcf31mxw59hb1x17xncnm3dyw90ylh8rqx462lvypqh3nr6c8l"; + src = fetch "libcxxabi" "1vdc6zld5rlbrbpxf0fxs0m6k1cabpi82ksiwgj1pmhx8l140n0q"; nativeBuildInputs = [ cmake ]; buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; diff --git a/pkgs/development/compilers/llvm/12/libunwind.nix b/pkgs/development/compilers/llvm/12/libunwind.nix index 0c635cabc0a..eba07ac76be 100644 --- a/pkgs/development/compilers/llvm/12/libunwind.nix +++ b/pkgs/development/compilers/llvm/12/libunwind.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { pname = "libunwind"; inherit version; - src = fetch pname "1vpqs2c358v8fbr1r8jmzkfqk12jllimjcfmgxga127ksq9b37nj"; + src = fetch pname "18n3k2kf6pyvzspnz1i22czbgi14kmch76fxml8kvhky7mw7v1yz"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/compilers/llvm/12/lld.nix b/pkgs/development/compilers/llvm/12/lld.nix index 1a16184a6e7..b605e20d1da 100644 --- a/pkgs/development/compilers/llvm/12/lld.nix +++ b/pkgs/development/compilers/llvm/12/lld.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetch +, libunwind , cmake , libxml2 , llvm @@ -10,11 +11,18 @@ stdenv.mkDerivation rec { pname = "lld"; inherit version; - src = fetch pname "1kk61i7z5bi9i11rzsd2b388d42if1c7a45zkaa4mk0yps67hyh1"; + src = fetch pname "097pxd7hgipr538vi48q8fi5svbd03bx3d078a06wigmvb7kzvw1"; nativeBuildInputs = [ cmake ]; 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" ]; postInstall = '' diff --git a/pkgs/development/compilers/llvm/12/lldb.nix b/pkgs/development/compilers/llvm/12/lldb.nix index 2f54305736a..ab356419ea2 100644 --- a/pkgs/development/compilers/llvm/12/lldb.nix +++ b/pkgs/development/compilers/llvm/12/lldb.nix @@ -11,7 +11,12 @@ , clang-unwrapped , python3 , version -, darwin +, libobjc +, xpc +, Foundation +, bootstrap_cmds +, Carbon +, Cocoa , lit , enableManpages ? false }: @@ -20,7 +25,7 @@ stdenv.mkDerivation (rec { pname = "lldb"; inherit version; - src = fetch pname "1vlyg015dyng43xqb8cg2l6r9ix8klibxsajazbfnckdnh54hwxj"; + src = fetch pname "077fli9l0fg4kpa5l9vrj810s13ajs15d745lg4l8kmjkbw7p3yh"; patches = [ ./lldb-procfs.patch ]; @@ -35,12 +40,12 @@ stdenv.mkDerivation (rec { llvm ] ++ 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 + libobjc + xpc + Foundation + bootstrap_cmds + Carbon + Cocoa ]; hardeningDisable = [ "format" ]; @@ -81,9 +86,8 @@ stdenv.mkDerivation (rec { ''; propagatedBuildInputs = []; - + # manually install lldb man page installPhase = '' - # manually install lldb man page mkdir -p $out/share/man/man1 install docs/man/lldb.1 -t $out/share/man/man1/ ''; diff --git a/pkgs/development/compilers/llvm/12/llvm.nix b/pkgs/development/compilers/llvm/12/llvm.nix index cb44643ff78..87175b474c5 100644 --- a/pkgs/development/compilers/llvm/12/llvm.nix +++ b/pkgs/development/compilers/llvm/12/llvm.nix @@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec { pname = "llvm"; inherit version; - src = fetch pname "199yq3a214avcbi4kk2q0ajriifkvsr0l2dkx3a666m033ihi1ff"; - polly_src = fetch "polly" "031r23ijhx7v93a5n33m2nc0x9xyqmx0d8xg80z7q971p6qd63sq"; + src = fetch pname "1lpdkndjb8cxpcyjv9glqp58687j8y8cvd7r72pw6sbqkkzq86g5"; + polly_src = fetch "polly" "002a8q3lgspvqdb8fi09cl11x438x6a2d2sb026jargrx92i5vas"; unpackPhase = '' unpackFile $src @@ -69,6 +69,9 @@ in stdenv.mkDerivation (rec { substituteInPlace unittests/Support/CMakeLists.txt \ --replace "Path.cpp" "" rm unittests/Support/Path.cpp + substituteInPlace unittests/IR/CMakeLists.txt \ + --replace "PassBuilderCallbacksTest.cpp" "" + rm unittests/IR/PassBuilderCallbacksTest.cpp '' + optionalString stdenv.hostPlatform.isMusl '' patch -p1 -i ${../TLI-musl.patch} substituteInPlace unittests/Support/CMakeLists.txt \ @@ -122,11 +125,11 @@ in stdenv.mkDerivation (rec { "-DCAN_TARGET_i386=false" ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildPackages.llvm_11}/bin/llvm-tblgen" + "-DLLVM_TABLEGEN=${buildPackages.llvm_12}/bin/llvm-tblgen" ]; postBuild = '' - rm -fR $out + rm -R $out ''; preCheck = '' @@ -171,8 +174,6 @@ in stdenv.mkDerivation (rec { make docs-llvm-man ''; - propagatedBuildInputs = []; - installPhase = '' make -C docs install ''; diff --git a/pkgs/development/compilers/llvm/12/openmp.nix b/pkgs/development/compilers/llvm/12/openmp.nix index c99358cd287..3cb5a09de8f 100644 --- a/pkgs/development/compilers/llvm/12/openmp.nix +++ b/pkgs/development/compilers/llvm/12/openmp.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { pname = "openmp"; inherit version; - src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi"; + src = fetch pname "0kw1g7ndvwi0g7lx5d55mp81h9vffxz820l9r2wjdvvfs3dsyq05"; patches = [ # Fix compilation on aarch64-darwin, remove after the next release. -- cgit 1.4.1