Update to 1.56.0
This commit is contained in:
parent
1d5c2773d6
commit
725f92a955
@ -1,102 +0,0 @@
|
||||
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
|
||||
|
||||
@ -12,7 +12,7 @@ index 243f6ac0..c2dd8785 100644
|
||||
--- a/src/tools/cargo/src/bin/cargo/cli.rs
|
||||
+++ b/src/tools/cargo/src/bin/cargo/cli.rs
|
||||
@@ -92,7 +92,12 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
|
||||
if is_verbose {
|
||||
} else if is_verbose {
|
||||
drop_println!(config, " {:<20} {}", name, path.display());
|
||||
} else {
|
||||
- drop_println!(config, " {}", name);
|
||||
@ -24,7 +24,7 @@ index 243f6ac0..c2dd8785 100644
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
CommandInfo::Alias { target } => {
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
36
rust.spec
36
rust.spec
@ -1,9 +1,9 @@
|
||||
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x
|
||||
%{!?channel: %global channel stable}
|
||||
%global bootstrap_rust 1.54.0
|
||||
%global bootstrap_cargo 1.54.0
|
||||
%global bootstrap_channel 1.54.0
|
||||
%global bootstrap_date 2021-12-15
|
||||
%global bootstrap_rust 1.55.0
|
||||
%global bootstrap_cargo 1.55.0
|
||||
%global bootstrap_channel 1.55.0
|
||||
%global bootstrap_date 2021-12-18
|
||||
%bcond_with llvm_static
|
||||
%bcond_with bundled_llvm
|
||||
%bcond_without bundled_libgit2
|
||||
@ -11,7 +11,7 @@
|
||||
%bcond_without curl_http2
|
||||
%bcond_without lldb
|
||||
Name: rust
|
||||
Version: 1.55.0
|
||||
Version: 1.56.0
|
||||
Release: 1
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||
@ -24,12 +24,11 @@ ExclusiveArch: %{rust_arches}
|
||||
%endif
|
||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.gz
|
||||
|
||||
Patch0001: 0001-Revert-Auto-merge-of-79547.patch
|
||||
Patch0008: rustc-1.48.0-disable-libssh2.patch
|
||||
Patch0009: rustc-1.51.0-disable-http2.patch
|
||||
Patch0010: clippy-driver-usage-should-user-friendly.patch
|
||||
Patch0011: cargo-help-clippy-should-have-description-to-user.patch
|
||||
Patch0012: fix-a-println-wrong-format.patch
|
||||
Patch0000: rustc-1.56.0-disable-libssh2.patch
|
||||
Patch0001: rustc-1.56.0-disable-http2.patch
|
||||
Patch0002: clippy-driver-usage-should-user-friendly.patch
|
||||
Patch0003: cargo-help-clippy-should-have-description-to-user.patch
|
||||
Patch0004: fix-a-println-wrong-format.patch
|
||||
%{lua: function rust_triple(arch)
|
||||
local abi = "gnu"
|
||||
if arch == "armv7hl" then
|
||||
@ -237,20 +236,19 @@ test -f '%{local_rust_root}/bin/cargo'
|
||||
test -f '%{local_rust_root}/bin/rustc'
|
||||
%endif
|
||||
%setup -q -n %{rustc_package}
|
||||
%patch0001 -p1
|
||||
%if %with disabled_libssh2
|
||||
%patch0008 -p1
|
||||
%patch0000 -p1
|
||||
%endif
|
||||
%if %without curl_http2
|
||||
%patch0009 -p1
|
||||
%patch0001 -p1
|
||||
rm -rf vendor/libnghttp2-sys/
|
||||
%endif
|
||||
%if "%{python}" != "python3"
|
||||
sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
|
||||
%endif
|
||||
%patch0010 -p1
|
||||
%patch0011 -p1
|
||||
%patch0012 -p1
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
%patch0004 -p1
|
||||
rm -rf vendor/curl-sys/curl/
|
||||
rm -rf vendor/jemalloc-sys/jemalloc/
|
||||
rm -rf vendor/libssh2-sys/libssh2/
|
||||
@ -392,6 +390,7 @@ export %{rust_env}
|
||||
%dir %{rustlibdir}/%{rust_musl_triple}/lib
|
||||
%{rustlibdir}/%{rust_musl_triple}/lib/*.rlib
|
||||
%{rustlibdir}/%{rust_musl_triple}/lib/self-contained/*.o
|
||||
%{rustlibdir}/%{rust_musl_triple}/lib/self-contained/libunwind.a
|
||||
|
||||
%files debugger-common
|
||||
%dir %{rustlibdir}
|
||||
@ -465,6 +464,9 @@ export %{rust_env}
|
||||
%{_mandir}/man1/cargo*.1*
|
||||
|
||||
%changelog
|
||||
* Sat Dec 18 2021 sdlzx <hdu_sdlzx@163.com> - 1.56.0-1
|
||||
- Update to 1.56.0
|
||||
|
||||
* Wed Dec 15 2021 sdlzx <hdu_sdlzx@163.com> - 1.55.0-1
|
||||
- Update to 1.55.0
|
||||
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
--- rustc-1.48.0-src/Cargo.lock.orig 2020-11-16 06:01:53.000000000 -0800
|
||||
+++ rustc-1.48.0-src/Cargo.lock 2020-11-16 09:27:44.425104404 -0800
|
||||
@@ -1676,7 +1676,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libssh2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1693,20 +1692,6 @@
|
||||
]
|
||||
|
||||
[[package]]
|
||||
-name = "libssh2-sys"
|
||||
-version = "0.2.19"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "ca46220853ba1c512fc82826d0834d87b06bcd3c2a42241b7de72f3d2fe17056"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
- "libc",
|
||||
- "libz-sys",
|
||||
- "openssl-sys",
|
||||
- "pkg-config",
|
||||
- "vcpkg",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-1.48.0-src/vendor/git2/Cargo.toml.orig 2020-11-16 06:27:49.000000000 -0800
|
||||
+++ rustc-1.48.0-src/vendor/git2/Cargo.toml 2020-11-16 09:27:44.425104404 -0800
|
||||
@@ -49,7 +49,7 @@
|
||||
version = "0.1.39"
|
||||
|
||||
[features]
|
||||
-default = ["ssh", "https", "ssh_key_from_memory"]
|
||||
+default = ["https"]
|
||||
https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"]
|
||||
ssh = ["libgit2-sys/ssh"]
|
||||
ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"]
|
||||
@ -1,6 +1,19 @@
|
||||
--- rustc-beta-src/Cargo.lock.orig 2021-03-09 10:30:08.626424998 -0800
|
||||
+++ rustc-beta-src/Cargo.lock 2021-03-09 10:32:38.096207704 -0800
|
||||
@@ -899,7 +899,6 @@
|
||||
From a27b88852f2e2f48d4a0434d2ef546d1ff29329c Mon Sep 17 00:00:00 2001
|
||||
From: sdlzx <hdu_sdlzx@163.com>
|
||||
Date: Fri, 17 Dec 2021 23:27:57 +0800
|
||||
Subject: disable http2
|
||||
|
||||
---
|
||||
Cargo.lock | 11 -----------
|
||||
src/tools/cargo/Cargo.toml | 2 +-
|
||||
src/tools/cargo/src/cargo/core/package.rs | 12 +++---------
|
||||
3 files changed, 4 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 26f68e235..926c2db74 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -877,7 +877,6 @@ checksum = "e0f44960aea24a786a46907b8824ebc0e66ca06bf4e4978408c7499620343483"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -8,10 +21,11 @@
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1860,16 +1859,6 @@
|
||||
]
|
||||
@@ -1906,16 +1905,6 @@ version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||
|
||||
[[package]]
|
||||
-[[package]]
|
||||
-name = "libnghttp2-sys"
|
||||
-version = "0.1.4+1.41.0"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
@ -21,24 +35,27 @@
|
||||
- "libc",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
name = "libssh2-sys"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2021-03-05 08:34:15.000000000 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2021-03-09 10:32:38.096207704 -0800
|
||||
@@ -25,7 +25,7 @@
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.3"
|
||||
diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml
|
||||
index ba5b956dd..eca593482 100644
|
||||
--- a/src/tools/cargo/Cargo.toml
|
||||
+++ b/src/tools/cargo/Cargo.toml
|
||||
@@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" }
|
||||
cargo-util = { path = "crates/cargo-util", version = "0.1.1" }
|
||||
crates-io = { path = "crates/crates-io", version = "0.33.0" }
|
||||
crossbeam-utils = "0.8"
|
||||
-curl = { version = "0.4.38", features = ["http2"] }
|
||||
+curl = { version = "0.4.38", features = [] }
|
||||
curl-sys = "0.4.45"
|
||||
curl-sys = "0.4.48"
|
||||
env_logger = "0.9.0"
|
||||
pretty_env_logger = { version = "0.4", optional = true }
|
||||
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-03-05 08:34:15.000000000 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2021-03-09 10:32:38.096207704 -0800
|
||||
@@ -412,14 +412,8 @@
|
||||
diff --git a/src/tools/cargo/src/cargo/core/package.rs b/src/tools/cargo/src/cargo/core/package.rs
|
||||
index 6605a348e..92a01a89c 100644
|
||||
--- a/src/tools/cargo/src/cargo/core/package.rs
|
||||
+++ b/src/tools/cargo/src/cargo/core/package.rs
|
||||
@@ -417,14 +417,8 @@ impl<'cfg> PackageSet<'cfg> {
|
||||
// Also note that pipelining is disabled as curl authors have indicated
|
||||
// that it's buggy, and we've empirically seen that it's buggy with HTTP
|
||||
// proxies.
|
||||
@ -55,7 +72,7 @@
|
||||
|
||||
Ok(PackageSet {
|
||||
packages: package_ids
|
||||
@@ -592,7 +586,7 @@
|
||||
@@ -653,7 +647,7 @@ impl<'cfg> PackageSet<'cfg> {
|
||||
macro_rules! try_old_curl {
|
||||
($e:expr, $msg:expr) => {
|
||||
let result = $e;
|
||||
@ -64,3 +81,6 @@
|
||||
if let Err(e) = result {
|
||||
warn!("ignoring libcurl {} error: {}", $msg, e);
|
||||
}
|
||||
--
|
||||
2.33.1
|
||||
|
||||
59
rustc-1.56.0-disable-libssh2.patch
Normal file
59
rustc-1.56.0-disable-libssh2.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 2e519b6b69557ce39444b39e34db6e660c710aa2 Mon Sep 17 00:00:00 2001
|
||||
From: sdlzx <hdu_sdlzx@163.com>
|
||||
Date: Fri, 17 Dec 2021 23:26:22 +0800
|
||||
Subject: disable libssh2
|
||||
|
||||
---
|
||||
Cargo.lock | 15 ---------------
|
||||
vendor/git2/Cargo.toml | 2 +-
|
||||
2 files changed, 1 insertion(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 4f1a5ca35..26f68e235 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -1895,7 +1895,6 @@ checksum = "3da6a42da88fc37ee1ecda212ffa254c25713532980005d5f7c0b0fbe7e6e885"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libssh2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1917,20 +1916,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "libssh2-sys"
|
||||
-version = "0.2.19"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "ca46220853ba1c512fc82826d0834d87b06bcd3c2a42241b7de72f3d2fe17056"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
- "libc",
|
||||
- "libz-sys",
|
||||
- "openssl-sys",
|
||||
- "pkg-config",
|
||||
- "vcpkg",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.3"
|
||||
diff --git a/vendor/git2/Cargo.toml b/vendor/git2/Cargo.toml
|
||||
index 4481d79c6..4e869c55f 100644
|
||||
--- a/vendor/git2/Cargo.toml
|
||||
+++ b/vendor/git2/Cargo.toml
|
||||
@@ -52,7 +52,7 @@ version = "3.3.0"
|
||||
version = "0.1.39"
|
||||
|
||||
[features]
|
||||
-default = ["ssh", "https", "ssh_key_from_memory"]
|
||||
+default = ["https"]
|
||||
https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"]
|
||||
ssh = ["libgit2-sys/ssh"]
|
||||
ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"]
|
||||
--
|
||||
2.33.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user