Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bc3c95481e54
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d5bc837de65a
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Dec 14, 2020

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    vbgl Vincent Laporte
    Copy the full SHA
    c73d96f View commit details

Commits on Dec 16, 2020

  1. Merge pull request #106886 from tvbeat/rustLLVMrefactor

    [staging] rust: cleanup, use correct llvm version
    Mic92 authored Dec 16, 2020
    Copy the full SHA
    d5bc837 View commit details
15 changes: 12 additions & 3 deletions pkgs/development/compilers/rust/1_45.nix
Original file line number Diff line number Diff line change
@@ -11,15 +11,24 @@
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages
, pkgsBuildTarget, pkgsBuildBuild
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
, makeRustPlatform
, llvmPackages_5, llvm_10
} @ args:

import ./default.nix {
rustcVersion = "1.45.2";
rustcSha256 = "0273a1g3f59plyi1n0azf21qjzwml1yqdnj5z472crz37qggr8xp";

llvmSharedForBuild = pkgsBuildBuild.llvm_10.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvm_10.override { enableSharedLibraries = true; };
llvmSharedForTarget = pkgsBuildTarget.llvm_10.override { enableSharedLibraries = true; };

llvmBootstrapForDarwin = llvmPackages_5;

# For use at runtime
llvmShared = llvm_10.override { enableSharedLibraries = true; };

# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.44.1";
@@ -41,4 +50,4 @@ import ./default.nix {
];
}

(builtins.removeAttrs args [ "fetchpatch" ])
(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_5" "llvm_10" ])
15 changes: 12 additions & 3 deletions pkgs/development/compilers/rust/1_48.nix
Original file line number Diff line number Diff line change
@@ -13,15 +13,24 @@
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages
, pkgsBuildTarget, pkgsBuildBuild
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
, makeRustPlatform
, llvmPackages_5, llvm_11
} @ args:

import ./default.nix {
rustcVersion = "1.48.0";
rustcSha256 = "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwxhf";

llvmSharedForBuild = pkgsBuildBuild.llvm_11.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvm_11.override { enableSharedLibraries = true; };
llvmSharedForTarget = pkgsBuildTarget.llvm_11.override { enableSharedLibraries = true; };

llvmBootstrapForDarwin = llvmPackages_5;

# For use at runtime
llvmShared = llvm_11.override { enableSharedLibraries = true; };

# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.47.0";
@@ -43,4 +52,4 @@ import ./default.nix {
];
}

(builtins.removeAttrs args [ "fetchpatch" ])
(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_5" "llvm_11"])
15 changes: 10 additions & 5 deletions pkgs/development/compilers/rust/default.nix
Original file line number Diff line number Diff line change
@@ -5,12 +5,16 @@
, bootstrapHashes
, selectRustPackage
, rustcPatches ? []
, llvmBootstrapForDarwin
, llvmShared
, llvmSharedForBuild
, llvmSharedForHost
, llvmSharedForTarget
}:
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages
, pkgsBuildTarget, pkgsBuildBuild
, makeRustPlatform
}: rec {
@@ -76,16 +80,17 @@
version = rustcVersion;
sha256 = rustcSha256;
inherit enableRustcDev;
inherit llvmShared llvmSharedForBuild llvmSharedForHost llvmSharedForTarget;

patches = rustcPatches;

# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
} // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) {
stdenv = llvmPackages.stdenv;
pkgsBuildBuild = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages.stdenv; };
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages.stdenv; };
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages.stdenv; };
stdenv = llvmBootstrapForDarwin.stdenv;
pkgsBuildBuild = pkgsBuildBuild // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; };
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; };
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; };
});
rustfmt = self.callPackage ./rustfmt.nix { inherit Security; };
cargo = self.callPackage ./cargo.nix {
10 changes: 2 additions & 8 deletions pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget
, fetchurl, file, python3
, llvm_10, darwin, cmake, rust, rustPlatform
, darwin, cmake, rust, rustPlatform
, pkgconfig, openssl
, which, libffi
, withBundledLLVM ? false
@@ -13,13 +14,6 @@
let
inherit (stdenv.lib) optionals optional optionalString concatStringsSep;
inherit (darwin.apple_sdk.frameworks) Security;

llvmSharedForBuild = pkgsBuildBuild.llvm_10.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvm_10.override { enableSharedLibraries = true; };
llvmSharedForTarget = pkgsBuildTarget.llvm_10.override { enableSharedLibraries = true; };

# For use at runtime
llvmShared = llvm_10.override { enableSharedLibraries = true; };
in stdenv.mkDerivation rec {
pname = "rustc";
inherit version;
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -10036,11 +10036,9 @@ in
# So this commit doesn't remove the 1.45.2 release.
rust_1_45 = callPackage ../development/compilers/rust/1_45.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10;
};
rust_1_48 = callPackage ../development/compilers/rust/1_48.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_11;
};
rust = rust_1_48;