summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-08-17 16:22:42 +0200
committerGitHub <noreply@github.com>2019-08-17 16:22:42 +0200
commit1f3c2bcefe314553abd2ab571dd3b1fc8d987d35 (patch)
treedc4b61221e97f686b17747cfb683e286d560183e
parentf84a72559048007ed14fff87dacca9cac0f2c8d4 (diff)
parentb7a828031238b0962cd91131eba50844ef401b93 (diff)
downloadnixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.tar
nixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.tar.gz
nixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.tar.bz2
nixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.tar.lz
nixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.tar.xz
nixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.tar.zst
nixpkgs-1f3c2bcefe314553abd2ab571dd3b1fc8d987d35.zip
Merge pull request #66686 from edolstra/rustc-1.37.0
rustc: 1.36.0 -> 1.37.0
-rw-r--r--pkgs/development/compilers/rust/binary.nix (renamed from pkgs/development/compilers/rust/binaryBuild.nix)2
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix18
-rw-r--r--pkgs/development/compilers/rust/rustc.nix27
3 files changed, 29 insertions, 18 deletions
diff --git a/pkgs/development/compilers/rust/binaryBuild.nix b/pkgs/development/compilers/rust/binary.nix
index cb2fba96e18..acccc749686 100644
--- a/pkgs/development/compilers/rust/binaryBuild.nix
+++ b/pkgs/development/compilers/rust/binary.nix
@@ -60,6 +60,8 @@ rec {
       # are very hard to track down. For details, see
       # https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943
     '';
+
+    setupHooks = ./setup-hook.sh;
   };
 
   cargo = stdenv.mkDerivation rec {
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index 973d17e1c7b..5cf48715dae 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -3,16 +3,16 @@
 let
   # Note: the version MUST be one version prior to the version we're
   # building
-  version = "1.35.0";
+  version = "1.36.0";
 
-  # fetch hashes by running `print-hashes.sh 1.34.2`
+  # fetch hashes by running `print-hashes.sh 1.36.0`
   hashes = {
-    i686-unknown-linux-gnu = "05337776b3645e4b8c8c7ced0bcd1615cf9ad1b9c8b3d0f333620e5401e31aee";
-    x86_64-unknown-linux-gnu = "cf600e2273644d8629ed57559c70ca8db4023fd0156346facca9ab3ad3e8f86c";
-    armv7-unknown-linux-gnueabihf = "8f0f32d8ddc6fb7bcb8f50ec5e694078799d93facbf135eec5bd9a8c94d0c11e";
-    aarch64-unknown-linux-gnu = "31e6da56e67838fd2874211ae896a433badf67c13a7b68481f1d5f7dedcc5952";
-    i686-apple-darwin = "6a45ae8db094c5f6c57c5594a00f1a92b08c444a7347a657b4033186d4f08b19";
-    x86_64-apple-darwin = "ac14b1c7dc330dcb53d8641d74ebf9b32aa8b03b9d650bcb9258030d8b10dbd6";
+    i686-unknown-linux-gnu = "9f95c3e96622a792858c8a1c9274fa63e6992370493b27c1ac7299a3bec5156d";
+    x86_64-unknown-linux-gnu = "15e592ec52f14a0586dcebc87a957e472c4544e07359314f6354e2b8bd284c55";
+    armv7-unknown-linux-gnueabihf = "798181a728017068f9eddfa665771805d97846cd87bddcd67e0fe27c8d082ceb";
+    aarch64-unknown-linux-gnu = "db78c24d93756f9fe232f081dbc4a46d38f8eec98353a9e78b9b164f9628042d";
+    i686-apple-darwin = "3dbc34fdea8bc030badf9c8b2572c09fd3f5369b59ac099fc521064b390b9e60";
+    x86_64-apple-darwin = "91f151ec7e24f5b0645948d439fc25172ec4012f0584dd16c3fb1acb709aa325";
   };
 
   platform =
@@ -35,7 +35,7 @@ let
      sha256 = hashes."${platform}";
   };
 
-in callPackage ./binaryBuild.nix
+in callPackage ./binary.nix
   { inherit version src platform;
     versionType = "bootstrap";
   }
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index d7776958390..daf7af1babd 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -1,6 +1,6 @@
 { stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
 , fetchurl, file, python2, tzdata, ps
-, llvm_7, darwin, git, cmake, rustPlatform
+, llvmPackages_7, darwin, git, cmake, rustPlatform
 , which, libffi, gdb
 , withBundledLLVM ? false
 }:
@@ -9,21 +9,31 @@ let
   inherit (stdenv.lib) optional optionalString;
   inherit (darwin.apple_sdk.frameworks) Security;
 
-  llvmSharedForBuild = pkgsBuildBuild.llvm_7.override { enableSharedLibraries = true; };
-  llvmSharedForHost = pkgsBuildHost.llvm_7.override { enableSharedLibraries = true; };
-  llvmSharedForTarget = pkgsBuildTarget.llvm_7.override { enableSharedLibraries = true; };
+  llvmPackages = llvmPackages_7;
+
+  llvmSharedForBuild = pkgsBuildBuild.llvmPackages.llvm.override { enableSharedLibraries = true; };
+  llvmSharedForHost = pkgsBuildHost.llvmPackages.llvm.override { enableSharedLibraries = true; };
+  llvmSharedForTarget = pkgsBuildTarget.llvmPackages.llvm.override { enableSharedLibraries = true; };
 
   # For use at runtime
-  llvmShared = llvm_7.override { enableSharedLibraries = true; };
-in stdenv.mkDerivation rec {
+  llvmShared = llvmPackages.llvm.override { enableSharedLibraries = true; };
+in
+
+stdenv.mkDerivation rec {
   pname = "rustc";
-  version = "1.36.0";
+  version = "1.37.0";
 
   src = fetchurl {
     url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
-    sha256 = "06xv2p6zq03lidr0yaf029ii8wnjjqa894nkmrm6s0rx47by9i04";
+    sha256 = "1hrqprybhkhs6d9b5pjskfnc5z9v2l2gync7nb39qjb5s0h703hj";
   };
 
+  # Provide the compiler-rt sources needed for profiling.
+  preConfigure = ''
+    mkdir src/llvm-project/compiler-rt
+    tar xf ${llvmPackages.compiler-rt.src} -C src/llvm-project/compiler-rt --strip-components=1
+  '';
+
   __darwinAllowLocalNetworking = true;
 
   # rustc complains about modified source files otherwise
@@ -38,7 +48,6 @@ in stdenv.mkDerivation rec {
   # See: https://github.com/NixOS/nixpkgs/pull/56540#issuecomment-471624656
   stripDebugList = [ "bin" ];
 
-
   NIX_LDFLAGS =
        # when linking stage1 libstd: cc: undefined reference to `__cxa_begin_catch'
        optional (stdenv.isLinux && !withBundledLLVM) "--push-state --as-needed -lstdc++ --pop-state"