rustc: 1.41.0 -> 1.42.0

The patch is included in rust master[1], but neither that, nor the
QuiltOS version we were using previously, apply to 1.42.0, so I've
included the fixed version here.

[1]: 4f15867faf
This commit is contained in:
Alyssa Ross 2020-03-12 23:24:14 +00:00
parent 7ef8a42ab2
commit dc3c338e29
4 changed files with 100 additions and 52 deletions

View File

@ -0,0 +1,52 @@
From 036c87c82793f1da9f98445e8e27462cc19bbe0a Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Sat, 22 Feb 2020 14:38:38 -0500
Subject: [PATCH] Allow getting `no_std` from the config file
Currently, it is only set correctly in the sanity checking implicit
default fallback code. Having a config file at all will for force
`no_std = false`.
---
src/bootstrap/config.rs | 3 +++
src/bootstrap/sanity.rs | 4 +---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 110c8b844d5..83a6934d477 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -350,6 +350,7 @@ struct TomlTarget {
musl_root: Option<String>,
wasi_root: Option<String>,
qemu_rootfs: Option<String>,
+ no_std: Option<bool>,
}
impl Config {
@@ -610,6 +611,8 @@ impl Config {
target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
+ target.no_std
+ = cfg.no_std.unwrap_or(triple.contains("-none-") || triple.contains("nvptx"));
config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
}
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index 8ff7056e628..76e721ed8e3 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -194,9 +194,7 @@ pub fn check(build: &mut Build) {
if target.contains("-none-") || target.contains("nvptx") {
if build.no_std(*target).is_none() {
- let target = build.config.target_config.entry(target.clone()).or_default();
-
- target.no_std = true;
+ build.config.target_config.entry(target.clone()).or_default();
}
if build.no_std(*target) == Some(false) {
--
2.24.1

View File

@ -1,48 +0,0 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# 3. Firefox and Thunderbird should still build on x86_64-linux.
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages_5
, pkgsBuildTarget, pkgsBuildBuild
, fetchpatch
} @ args:
import ./default.nix {
rustcVersion = "1.41.0";
rustcSha256 = "0jypz2mrzac41sj0zh07yd1z36g2s2rvgsb8g624sk4l14n84ijm";
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.40.0";
# fetch hashes by running `print-hashes.sh 1.40.0`
bootstrapHashes = {
i686-unknown-linux-gnu = "d050d3a1c7c45ba9c50817d45bf6d7dd06e1a4d934f633c8096b7db6ae27adc1";
x86_64-unknown-linux-gnu = "fc91f8b4bd18314e83a617f2389189fc7959146b7177b773370d62592d4b07d0";
arm-unknown-linux-gnueabihf = "4be9949c4d3c572b69b1df61c3506a3a3ac044851f025d38599612e7caa933c5";
armv7-unknown-linux-gnueabihf = "ebfe3978e12ffe34276272ee6d0703786249a9be80ca50617709cbfdab557306";
aarch64-unknown-linux-gnu = "639271f59766d291ebdade6050e7d05d61cb5c822a3ef9a1e2ab185fed68d729";
i686-apple-darwin = "ea189b1fb0bfda367cde6d43c18863ab4c64ffca04265e5746bf412a186fe1a2";
x86_64-apple-darwin = "749ca5e0b94550369cc998416b8854c13157f5d11d35e9b3276064b6766bcb83";
};
selectRustPackage = pkgs: pkgs.rust_1_41_0;
rustcPatches = [
(fetchpatch {
url = "https://github.com/QuiltOS/rust/commit/f1803452b9e95bfdbc3b8763138b9f92c7d12b46.diff";
sha256 = "1mzxaj46bq7ll617wg0mqnbnwr1da3hd4pbap8bjwhs3kfqnr7kk";
})
];
}
(builtins.removeAttrs args [ "fetchpatch" ])

View File

@ -0,0 +1,44 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# 3. Firefox and Thunderbird should still build on x86_64-linux.
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages_5
, pkgsBuildTarget, pkgsBuildBuild
} @ args:
import ./default.nix {
rustcVersion = "1.42.0";
rustcSha256 = "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j";
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.41.0";
# fetch hashes by running `print-hashes.sh 1.42.0`
bootstrapHashes = {
i686-unknown-linux-gnu = "a93a34f9cf3d35de2496352cb615b42b792eb09db3149b3a278efd2c58fa7897";
x86_64-unknown-linux-gnu = "343ba8ef7397eab7b3bb2382e5e4cb08835a87bff5c8074382c0b6930a41948b";
arm-unknown-linux-gnueabihf = "d0b33fcc97eeb96d716b30573c7e66affdf9077ecdecb30df2498b49f8284047";
armv7-unknown-linux-gnueabihf = "3c8e787fb4f4f304a065e78c38010f0b5722d809f9dafb0e904084bf0f54f7be";
aarch64-unknown-linux-gnu = "79ddfb5e2563d0ee09a567fbbe121a2aed3c3bc61255b2787f2dd42183a10f27";
i686-apple-darwin = "628134b3fbaf5c0e7a25bd9a2b8d25f6e68bb256c8b04a3332ec979f5a1cd339";
x86_64-apple-darwin = "b6504003ab70b11f278e0243a43ba9d6bf75e8ad6819b4058a2b6e3991cc8d7a";
};
selectRustPackage = pkgs: pkgs.rust_1_42_0;
rustcPatches = [
./0001-Allow-getting-no_std-from-the-config-file.patch
];
}
(builtins.removeAttrs args [ "fetchpatch" ])

View File

@ -8825,17 +8825,17 @@ in
inherit (darwin) apple_sdk;
};
rust_1_41_0 = callPackage ../development/compilers/rust/1_41_0.nix {
rust_1_42_0 = callPackage ../development/compilers/rust/1_42_0.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
rust_1_38_0 = callPackage ../development/compilers/rust/1_38_0.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
rust = rust_1_41_0;
rust = rust_1_42_0;
rustPackages_1_41_0 = rust_1_41_0.packages.stable;
rustPackages_1_42_0 = rust_1_42_0.packages.stable;
rustPackages_1_38_0 = rust_1_38_0.packages.stable;
rustPackages = rustPackages_1_41_0;
rustPackages = rustPackages_1_42_0;
inherit (rustPackages) cargo clippy rustc rustPlatform;
inherit (rust) makeRustPlatform;