about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorRicardo M. Correia <rcorreia@wizy.org>2015-10-17 18:39:50 +0200
committerRicardo M. Correia <rcorreia@wizy.org>2015-10-18 04:12:11 +0200
commit3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce (patch)
tree5a4018abe02e1d172848e63dd5237898dccf93df /pkgs/development/compilers
parent302b6403715c77ee803c2699c115d36b00377b35 (diff)
downloadnixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.tar
nixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.tar.gz
nixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.tar.bz2
nixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.tar.lz
nixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.tar.xz
nixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.tar.zst
nixlib-3d5ba0d5d6c28c08cd6eff77ca60d4015d656bce.zip
rustcMaster: 2015-09-23 -> 2015-10-17
The build was changed to compile with the bundled LLVM because compiling
against the system's LLVM now fails with compilation errors.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/rustc/generic.nix17
-rw-r--r--pkgs/development/compilers/rustc/head.nix7
2 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/development/compilers/rustc/generic.nix b/pkgs/development/compilers/rustc/generic.nix
index 2dc91cb5ec4c..9b3dca42b628 100644
--- a/pkgs/development/compilers/rustc/generic.nix
+++ b/pkgs/development/compilers/rustc/generic.nix
@@ -2,6 +2,7 @@
 , llvmPackages_37, jemalloc, ncurses
 
 , shortVersion, isRelease
+, forceBundledLLVM ? false
 , srcSha, srcRev ? ""
 , snapshotHashLinux686, snapshotHashLinux64
 , snapshotHashDarwin686, snapshotHashDarwin64
@@ -76,7 +77,7 @@ let version = if isRelease then
     snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
 in
 
-stdenv.mkDerivation {
+with stdenv.lib; stdenv.mkDerivation {
   inherit name;
   inherit version;
   inherit meta;
@@ -106,7 +107,7 @@ stdenv.mkDerivation {
     installPhase = ''
       mkdir -p "$out"
       cp -r bin "$out/bin"
-    '' + stdenv.lib.optionalString stdenv.isLinux ''
+    '' + optionalString stdenv.isLinux ''
       patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
                --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
                "$out/bin/rustc"
@@ -115,9 +116,10 @@ stdenv.mkDerivation {
 
   configureFlags = configureFlags
                 ++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
-                ++ [ "--llvm-root=${llvmPackages_37.llvm}" ] #"--jemalloc-root=${jemalloc}/lib" ]
+                # ++ [ "--jemalloc-root=${jemalloc}/lib"
                 ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${stdenv.cc.binutils}/bin/ar" ]
-                ++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang";
+                ++ optional (stdenv.cc.cc ? isClang) "--enable-clang"
+                ++ optional (!forceBundledLLVM) "--llvm-root=${llvmPackages_37.llvm}";
 
   inherit patches;
 
@@ -132,7 +134,7 @@ stdenv.mkDerivation {
       --replace "\$\$(subst  /,//," "\$\$(subst /,/,"
 
     # Fix dynamic linking against llvm
-    sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py
+    ${optionalString (!forceBundledLLVM) ''sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py''}
 
     # Fix the configure script to not require curl as we won't use it
     sed -i configure \
@@ -155,8 +157,9 @@ stdenv.mkDerivation {
 
   # Procps is needed for one of the test cases
   nativeBuildInputs = [ file python2 ]
-    ++ stdenv.lib.optionals stdenv.isLinux [ procps ];
-  buildInputs = [ llvmPackages_37.llvm ncurses ];
+    ++ optionals stdenv.isLinux [ procps ];
+  buildInputs = [ ncurses ]
+    ++ optional (!forceBundledLLVM) llvmPackages_37.llvm;
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix
index 016d09b3cf1a..94fdb0b34245 100644
--- a/pkgs/development/compilers/rustc/head.nix
+++ b/pkgs/development/compilers/rustc/head.nix
@@ -2,10 +2,11 @@
 { stdenv, callPackage }:
 
 callPackage ./generic.nix {
-  shortVersion = "2015-09-23";
+  shortVersion = "2015-10-17";
   isRelease = false;
-  srcRev = "b2f379cdc23aec5c5d0d62acfcc5a4a18ebf0e30";
-  srcSha = "1z710f5vv9pbis1q96dc6kqvi0j7xgg95r5f5c3czbvndrxjwm03";
+  forceBundledLLVM = true;
+  srcRev = "20a6938c0";
+  srcSha = "18dalmwmyw2csnm72qwkkh37ixxbrn2i5lmwp2q0x9plh5qj5627";
 
   /* Rust is bootstrapped from an earlier built version. We need
   to fetch these earlier versions, which vary per platform.