Update to 1.50.0.

This commit is contained in:
Josh Stone 2021-02-19 10:25:21 -08:00
parent 259615dcc0
commit 8148cbf678
5 changed files with 142 additions and 20 deletions

7
.gitignore vendored
View File

@ -321,3 +321,10 @@
/rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz /rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.48.0-s390x-unknown-linux-gnu.tar.xz /rust-1.48.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz /rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.50.0-src.tar.xz
/rust-1.49.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.49.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.49.0-i686-unknown-linux-gnu.tar.xz
/rust-1.49.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.49.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.49.0-x86_64-unknown-linux-gnu.tar.xz

View File

@ -0,0 +1,102 @@
From eaf7ea1fc339e1ff348ed941ed2e8c4d66f3e458 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 18 Feb 2021 19:14:58 -0800
Subject: [PATCH] Revert "Auto merge of #79547 - erikdesjardins:byval,
r=nagisa"
This reverts commit a094ff9590b83c8f94d898f92c2964a5803ded06, reversing
changes made to d37afad0cc87bf709ad10c85319296ac53030f03.
---
compiler/rustc_middle/src/ty/layout.rs | 12 ++++++------
...return-value-in-reg.rs => return-value-in-reg.rs} | 4 ++--
src/test/codegen/union-abi.rs | 11 +++--------
3 files changed, 11 insertions(+), 16 deletions(-)
rename src/test/codegen/{arg-return-value-in-reg.rs => return-value-in-reg.rs} (74%)
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
index b545b92c9252..545f6aee1a21 100644
--- a/compiler/rustc_middle/src/ty/layout.rs
+++ b/compiler/rustc_middle/src/ty/layout.rs
@@ -2849,7 +2849,7 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
|| abi == SpecAbi::RustIntrinsic
|| abi == SpecAbi::PlatformIntrinsic
{
- let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>| {
+ let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>, is_ret: bool| {
if arg.is_ignore() {
return;
}
@@ -2887,9 +2887,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
_ => return,
}
- // Pass and return structures up to 2 pointers in size by value, matching `ScalarPair`.
- // LLVM will usually pass these in 2 registers, which is more efficient than by-ref.
- let max_by_val_size = Pointer.size(cx) * 2;
+ // Return structures up to 2 pointers in size by value, matching `ScalarPair`. LLVM
+ // will usually return these in 2 registers, which is more efficient than by-ref.
+ let max_by_val_size = if is_ret { Pointer.size(cx) * 2 } else { Pointer.size(cx) };
let size = arg.layout.size;
if arg.layout.is_unsized() || size > max_by_val_size {
@@ -2901,9 +2901,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
arg.cast_to(Reg { kind: RegKind::Integer, size });
}
};
- fixup(&mut self.ret);
+ fixup(&mut self.ret, true);
for arg in &mut self.args {
- fixup(arg);
+ fixup(arg, false);
}
return;
}
diff --git a/src/test/codegen/arg-return-value-in-reg.rs b/src/test/codegen/return-value-in-reg.rs
similarity index 74%
rename from src/test/codegen/arg-return-value-in-reg.rs
rename to src/test/codegen/return-value-in-reg.rs
index a69291d47821..4bc0136c5e32 100644
--- a/src/test/codegen/arg-return-value-in-reg.rs
+++ b/src/test/codegen/return-value-in-reg.rs
@@ -1,4 +1,4 @@
-//! Check that types of up to 128 bits are passed and returned by-value instead of via pointer.
+//! This test checks that types of up to 128 bits are returned by-value instead of via out-pointer.
// compile-flags: -C no-prepopulate-passes -O
// only-x86_64
@@ -11,7 +11,7 @@ pub struct S {
c: u32,
}
-// CHECK: define i128 @modify(i128{{( %0)?}})
+// CHECK: define i128 @modify(%S* noalias nocapture dereferenceable(16) %s)
#[no_mangle]
pub fn modify(s: S) -> S {
S { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c }
diff --git a/src/test/codegen/union-abi.rs b/src/test/codegen/union-abi.rs
index f282fd237054..afea01e9a2d0 100644
--- a/src/test/codegen/union-abi.rs
+++ b/src/test/codegen/union-abi.rs
@@ -63,16 +63,11 @@ pub union UnionU128{a:u128}
#[no_mangle]
pub fn test_UnionU128(_: UnionU128) -> UnionU128 { loop {} }
-pub union UnionU128x2{a:(u128, u128)}
-// CHECK: define void @test_UnionU128x2(i128 %_1.0, i128 %_1.1)
-#[no_mangle]
-pub fn test_UnionU128x2(_: UnionU128x2) { loop {} }
-
#[repr(C)]
-pub union CUnionU128x2{a:(u128, u128)}
-// CHECK: define void @test_CUnionU128x2(%CUnionU128x2* {{.*}} %_1)
+pub union CUnionU128{a:u128}
+// CHECK: define void @test_CUnionU128(%CUnionU128* {{.*}} %_1)
#[no_mangle]
-pub fn test_CUnionU128x2(_: CUnionU128x2) { loop {} }
+pub fn test_CUnionU128(_: CUnionU128) { loop {} }
pub union UnionBool { b:bool }
// CHECK: define zeroext i1 @test_UnionBool(i8 %b)
--
2.29.2

View File

@ -9,10 +9,10 @@
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 # e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD # or nightly wants some beta-YYYY-MM-DD
# Note that cargo matches the program version here, not its crate version. # Note that cargo matches the program version here, not its crate version.
%global bootstrap_rust 1.48.0 %global bootstrap_rust 1.49.0
%global bootstrap_cargo 1.48.0 %global bootstrap_cargo 1.49.0
%global bootstrap_channel 1.48.0 %global bootstrap_channel 1.49.0
%global bootstrap_date 2020-11-19 %global bootstrap_date 2020-12-31
# Only the specified arches will use bootstrap binaries. # Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches} #global bootstrap_arches %%{rust_arches}
@ -21,11 +21,11 @@
%bcond_with llvm_static %bcond_with llvm_static
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM # We can also choose to just use Rust's bundled LLVM, in case the system LLVM
# is insufficient. Rust currently requires LLVM 8.0+. # is insufficient. Rust currently requires LLVM 9.0+.
%bcond_with bundled_llvm %bcond_with bundled_llvm
# Requires stable libgit2 1.0 # Requires stable libgit2 1.1
%if 0%{?fedora} >= 32 %if 0%{?fedora} >= 34
%bcond_with bundled_libgit2 %bcond_with bundled_libgit2
%else %else
%bcond_without bundled_libgit2 %bcond_without bundled_libgit2
@ -52,8 +52,8 @@
%endif %endif
Name: rust Name: rust
Version: 1.49.0 Version: 1.50.0
Release: 2%{?dist} Release: 1%{?dist}
Summary: The Rust Programming Language Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT) License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries) # ^ written as: (rust itself) and (bundled libraries)
@ -67,6 +67,10 @@ ExclusiveArch: %{rust_arches}
%endif %endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# This internal rust-abi change broke s390x -- revert for now.
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032
Patch1: 0001-Revert-Auto-merge-of-79547.patch
### RHEL-specific patches below ### ### RHEL-specific patches below ###
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
@ -148,7 +152,7 @@ BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib)
%if %without bundled_libgit2 %if %without bundled_libgit2
BuildRequires: pkgconfig(libgit2) >= 1.0.0 BuildRequires: pkgconfig(libgit2) >= 1.1.0
%endif %endif
%if %{without disabled_libssh2} %if %{without disabled_libssh2}
@ -396,6 +400,8 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package} %setup -q -n %{rustc_package}
%patch1 -p1
%if %with disabled_libssh2 %if %with disabled_libssh2
%patch100 -p1 %patch100 -p1
%endif %endif
@ -529,7 +535,8 @@ fi
--enable-vendor \ --enable-vendor \
--enable-verbose-tests \ --enable-verbose-tests \
%{?codegen_units_std} \ %{?codegen_units_std} \
--release-channel=%{channel} --release-channel=%{channel} \
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
%{python} ./x.py build -j "$ncpus" --stage 2 %{python} ./x.py build -j "$ncpus" --stage 2
%{python} ./x.py doc --stage 2 %{python} ./x.py doc --stage 2
@ -603,6 +610,9 @@ rm -f %{buildroot}%{_bindir}/rust-lldb
rm -f %{buildroot}%{rustlibdir}/etc/lldb_* rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
%endif %endif
# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp)
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
%check %check
export %{rust_env} export %{rust_env}
@ -677,6 +687,7 @@ export %{rust_env}
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY %license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY
%doc src/tools/cargo/README.md %doc src/tools/cargo/README.md
%{_bindir}/cargo %{_bindir}/cargo
%{_libexecdir}/cargo*
%{_mandir}/man1/cargo*.1* %{_mandir}/man1/cargo*.1*
%{_sysconfdir}/bash_completion.d/cargo %{_sysconfdir}/bash_completion.d/cargo
%{_datadir}/zsh/site-functions/_cargo %{_datadir}/zsh/site-functions/_cargo
@ -720,6 +731,9 @@ export %{rust_env}
%changelog %changelog
* Thu Feb 11 2021 Josh Stone <jistone@redhat.com> - 1.50.0-1
- Update to 1.50.0.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.0-2 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (rustc-1.49.0-src.tar.xz) = fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 SHA512 (rustc-1.50.0-src.tar.xz) = df3c83c0fdc9ebce6fdccddda781dea0cdbd88d2b2a8220cac40cc3a8fa957923ae834d1fa45283d4ad227b334bd9e220e37a4a1ad7a1c7aeb806ed9ed387245

View File

@ -1,8 +1,7 @@
SHA512 (rustc-1.49.0-src.tar.xz) = fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 SHA512 (rustc-1.50.0-src.tar.xz) = df3c83c0fdc9ebce6fdccddda781dea0cdbd88d2b2a8220cac40cc3a8fa957923ae834d1fa45283d4ad227b334bd9e220e37a4a1ad7a1c7aeb806ed9ed387245
SHA512 (rust-1.48.0-aarch64-unknown-linux-gnu.tar.xz) = 6ebbd936b1bc2ccf30b62dbbbc6f3986fb57738d89e33a23d58bab09be57a445c17df7912866add91cc108ef7547d229a08c6206db2d2fb00d72887ff6a0894d SHA512 (rust-1.49.0-aarch64-unknown-linux-gnu.tar.xz) = fa81b618359c2952de941e094eabfe2966e3c1a39a1b20452a77f1a68a54dde9cc5cade18db911cf448ffe947d934461ce752112bd9b5b5430e1fcdabbd8b56a
SHA512 (rust-1.48.0-armv7-unknown-linux-gnueabihf.tar.xz) = 9763b0c5bc5dc7b265b86636ed32947aab98bd9b5732c4b298ade93e9a09bab82ad37fc7ca2d7c97dfd87634756b3c55015d47696c0a6ed2cb44be03659bcf55 SHA512 (rust-1.49.0-armv7-unknown-linux-gnueabihf.tar.xz) = 1cba85fc958371aeb1d521e8842ad576e65d244147e2c75c34eaa776552ed025434d10284fa976d901d6cede69f6db3e5fdd770005ca0b93bb5e3202b9f9392a
SHA512 (rust-1.48.0-i686-unknown-linux-gnu.tar.xz) = b8b3c5407304a333fc6c10ad70363589a88673640dda7b5fde8971097e679f56a8c733da31b2183044ae2ce30700db923cc3c3cb8c590d785df680b60b199451 SHA512 (rust-1.49.0-i686-unknown-linux-gnu.tar.xz) = b4d39cb234314f013969b5db3d365d21719d7a01f2dc0816e4f221c5e6d4abecd7f9e83f54b8640173d00d3e701cb3cbb61cef32f00db9356139005a1ce3bd19
SHA512 (rust-1.48.0-powerpc64le-unknown-linux-gnu.tar.xz) = 7ddd2b0599872012f8613ccab456622cb05a0a43587b7d389e8b7fdf9381f0387763726d892da931233c89e8e3ce45c2b303ed00b1cce1f91c88d8f88d6b148d SHA512 (rust-1.49.0-powerpc64le-unknown-linux-gnu.tar.xz) = c17eb27ec4dbcc56da3edffbc57e0edda99744d6a0d38369fa08af066894aeb13dd78c7b8055f2246fc3bf13c654842675ea4df44b7bc8852e0f9952acdf7e7c
SHA512 (rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz) = f79e1f984cc3c4dce08599418be2885666e0b6f73e639b10e97ffff4b900606d880c0596b6c2ab7c5f999cfc364d22b2ca6ab88db6ba38b8b227670b222fe23b SHA512 (rust-1.49.0-s390x-unknown-linux-gnu.tar.xz) = 25259ea2e499c89459b14571e2c54f230d642af9cfe539dc2b8be15eff0e23b8c6e60af4c567bcbb6c6c185b4537eaab19c3395fce48b1f6e5ef1234efc31e3a
SHA512 (rust-1.48.0-s390x-unknown-linux-gnu.tar.xz) = b2b1565f3b1cc0c3bf4aa06aba1da7df775c6e29c892ca7727d0e549f175b632080433be2586e799c5636231de6c678f0228dedee8358fbf167016a1f7d25389 SHA512 (rust-1.49.0-x86_64-unknown-linux-gnu.tar.xz) = c008aa50e17db6a0134fb85235a958258d345410f5063bc77175f7c28b2e35895427b9e68cd1ac9acb769769c83313cd59fe6465b453e891cf415a2514b7722d
SHA512 (rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz) = 0784e156e70c47386abfa88ecfeb62b1109364459b1fee225de0749c30379c4eb443ff3ff7faa7dc1a6ff373bc6eb43997007f937889cb35daf940a74641753b