mirror of
https://git.proxmox.com/git/rustc
synced 2026-08-12 20:01:39 +00:00
Merge branch 'debian/experimental2' into debian/experimental
This commit is contained in:
commit
171e2ee803
18
debian/changelog
vendored
18
debian/changelog
vendored
@ -5,6 +5,24 @@ rustc (1.51.0+dfsg1-1~exp1) UNRELEASED; urgency=medium
|
||||
|
||||
-- Ximin Luo <infinity0@debian.org> Mon, 05 Apr 2021 22:18:19 +0100
|
||||
|
||||
rustc (1.50.0+dfsg1-1~exp4) experimental; urgency=medium
|
||||
|
||||
* Fix more tests with a backported upstream PR.
|
||||
|
||||
-- Ximin Luo <infinity0@debian.org> Mon, 12 Apr 2021 01:51:22 +0100
|
||||
|
||||
rustc (1.50.0+dfsg1-1~exp3) experimental; urgency=medium
|
||||
|
||||
* Fix cross-compile to windows using same-version stage0.
|
||||
|
||||
-- Ximin Luo <infinity0@debian.org> Sun, 11 Apr 2021 13:52:41 +0100
|
||||
|
||||
rustc (1.50.0+dfsg1-1~exp2) experimental; urgency=medium
|
||||
|
||||
* Fix tests, fix s390x breakage.
|
||||
|
||||
-- Ximin Luo <infinity0@debian.org> Fri, 09 Apr 2021 16:54:20 +0100
|
||||
|
||||
rustc (1.50.0+dfsg1-1~exp1) experimental; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
103
debian/patches/0001-Revert-Auto-merge-of-79547.patch
vendored
Normal file
103
debian/patches/0001-Revert-Auto-merge-of-79547.patch
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
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.
|
||||
|
||||
See https://github.com/rust-lang/rust/issues/80810 for more background
|
||||
---
|
||||
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
|
||||
|
||||
25
debian/patches/9756838f612da2ef6c359aaea8bf0a69ad76716a.patch
vendored
Normal file
25
debian/patches/9756838f612da2ef6c359aaea8bf0a69ad76716a.patch
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
From 9756838f612da2ef6c359aaea8bf0a69ad76716a Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Mon, 11 Jan 2021 15:13:26 -0800
|
||||
Subject: [PATCH] differentiate functions in extern-compare-with-return-type.rs
|
||||
|
||||
---
|
||||
src/test/ui/extern/extern-compare-with-return-type.rs | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/test/ui/extern/extern-compare-with-return-type.rs b/src/test/ui/extern/extern-compare-with-return-type.rs
|
||||
index 6c9ed3760f6e4..52b51bb943aa6 100644
|
||||
--- a/src/test/ui/extern/extern-compare-with-return-type.rs
|
||||
+++ b/src/test/ui/extern/extern-compare-with-return-type.rs
|
||||
@@ -2,8 +2,9 @@
|
||||
// Tests that we can compare various kinds of extern fn signatures.
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
-extern fn voidret1() {}
|
||||
-extern fn voidret2() {}
|
||||
+// `dbg!()` differentiates these functions to ensure they won't be merged.
|
||||
+extern fn voidret1() { dbg!() }
|
||||
+extern fn voidret2() { dbg!() }
|
||||
|
||||
extern fn uintret() -> usize { 22 }
|
||||
|
||||
4
debian/patches/series
vendored
4
debian/patches/series
vendored
@ -1,6 +1,10 @@
|
||||
# Patches for upstream
|
||||
|
||||
# pending, or forwarded
|
||||
9756838f612da2ef6c359aaea8bf0a69ad76716a.patch
|
||||
0001-Revert-Auto-merge-of-79547.patch
|
||||
u-84099.patch
|
||||
u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch
|
||||
u-ignore-gdb-10-failures.patch
|
||||
u-reproducible-build.patch
|
||||
u-make-tests-work-without-rpath.patch
|
||||
|
||||
163
debian/patches/u-84099.patch
vendored
Normal file
163
debian/patches/u-84099.patch
vendored
Normal file
@ -0,0 +1,163 @@
|
||||
From 5e87f97de789d68719efafde6a0175d64ed90e3b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= <tomasz.miasko@gmail.com>
|
||||
Date: Sun, 11 Apr 2021 00:00:00 +0000
|
||||
Subject: [PATCH] Check for asm support in UI tests that require it
|
||||
|
||||
Add `needs-asm-support` compiletest directive, and use it in asm tests
|
||||
that require asm support without relying on any architecture specific
|
||||
features.
|
||||
---
|
||||
src/test/ui/asm/bad-options.rs | 2 +-
|
||||
src/test/ui/asm/naked-invalid-attr.rs | 2 +-
|
||||
.../ui/feature-gates/feature-gate-naked_functions.rs | 1 +
|
||||
.../feature-gates/feature-gate-naked_functions.stderr | 4 ++--
|
||||
src/test/ui/rfc-2091-track-caller/error-with-naked.rs | 1 +
|
||||
.../ui/rfc-2091-track-caller/error-with-naked.stderr | 4 ++--
|
||||
src/tools/compiletest/src/header.rs | 5 +++++
|
||||
src/tools/compiletest/src/header/tests.rs | 11 +++++++++++
|
||||
src/tools/compiletest/src/util.rs | 9 +++++++++
|
||||
9 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/test/ui/asm/bad-options.rs b/src/test/ui/asm/bad-options.rs
|
||||
index 755fc2ca238aa..a60478f62154f 100644
|
||||
--- a/src/test/ui/asm/bad-options.rs
|
||||
+++ b/src/test/ui/asm/bad-options.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-// only-x86_64
|
||||
+// needs-asm-support
|
||||
|
||||
#![feature(asm)]
|
||||
|
||||
diff --git a/src/test/ui/asm/naked-invalid-attr.rs b/src/test/ui/asm/naked-invalid-attr.rs
|
||||
index cdb6c17454b73..2576d1124c85c 100644
|
||||
--- a/src/test/ui/asm/naked-invalid-attr.rs
|
||||
+++ b/src/test/ui/asm/naked-invalid-attr.rs
|
||||
@@ -1,6 +1,6 @@
|
||||
// Checks that #[naked] attribute can be placed on function definitions only.
|
||||
//
|
||||
-// ignore-wasm32 asm unsupported
|
||||
+// needs-asm-support
|
||||
#![feature(asm)]
|
||||
#![feature(naked_functions)]
|
||||
#![naked] //~ ERROR should be applied to a function definition
|
||||
diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.rs b/src/test/ui/feature-gates/feature-gate-naked_functions.rs
|
||||
index 06bddc422cf80..71ca5b9373a68 100644
|
||||
--- a/src/test/ui/feature-gates/feature-gate-naked_functions.rs
|
||||
+++ b/src/test/ui/feature-gates/feature-gate-naked_functions.rs
|
||||
@@ -1,3 +1,4 @@
|
||||
+// needs-asm-support
|
||||
#![feature(asm)]
|
||||
|
||||
#[naked]
|
||||
diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr
|
||||
index d95561d20133e..653d7b738da1a 100644
|
||||
--- a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr
|
||||
+++ b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0658]: the `#[naked]` attribute is an experimental feature
|
||||
- --> $DIR/feature-gate-naked_functions.rs:3:1
|
||||
+ --> $DIR/feature-gate-naked_functions.rs:4:1
|
||||
|
|
||||
LL | #[naked]
|
||||
| ^^^^^^^^
|
||||
@@ -8,7 +8,7 @@ LL | #[naked]
|
||||
= help: add `#![feature(naked_functions)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: the `#[naked]` attribute is an experimental feature
|
||||
- --> $DIR/feature-gate-naked_functions.rs:9:1
|
||||
+ --> $DIR/feature-gate-naked_functions.rs:10:1
|
||||
|
|
||||
LL | #[naked]
|
||||
| ^^^^^^^^
|
||||
diff --git a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs
|
||||
index 70ec0e3033c6f..9464ffe872282 100644
|
||||
--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs
|
||||
+++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs
|
||||
@@ -1,3 +1,4 @@
|
||||
+// needs-asm-support
|
||||
#![feature(asm, naked_functions)]
|
||||
|
||||
#[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
|
||||
diff --git a/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr b/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr
|
||||
index 1b49148d629b2..5f17d6b2b5173 100644
|
||||
--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr
|
||||
+++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0736]: cannot use `#[track_caller]` with `#[naked]`
|
||||
- --> $DIR/error-with-naked.rs:3:1
|
||||
+ --> $DIR/error-with-naked.rs:4:1
|
||||
|
|
||||
LL | #[track_caller]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0736]: cannot use `#[track_caller]` with `#[naked]`
|
||||
- --> $DIR/error-with-naked.rs:12:5
|
||||
+ --> $DIR/error-with-naked.rs:13:5
|
||||
|
|
||||
LL | #[track_caller]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
|
||||
index 531a23d76a27b..363105a9f09c0 100644
|
||||
--- a/src/tools/compiletest/src/header.rs
|
||||
+++ b/src/tools/compiletest/src/header.rs
|
||||
@@ -44,6 +44,7 @@ impl EarlyProps {
|
||||
let mut props = EarlyProps::default();
|
||||
let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some();
|
||||
let rustc_has_sanitizer_support = env::var_os("RUSTC_SANITIZER_SUPPORT").is_some();
|
||||
+ let has_asm_support = util::has_asm_support(&config.target);
|
||||
let has_asan = util::ASAN_SUPPORTED_TARGETS.contains(&&*config.target);
|
||||
let has_lsan = util::LSAN_SUPPORTED_TARGETS.contains(&&*config.target);
|
||||
let has_msan = util::MSAN_SUPPORTED_TARGETS.contains(&&*config.target);
|
||||
@@ -76,6 +77,10 @@ impl EarlyProps {
|
||||
props.ignore = true;
|
||||
}
|
||||
|
||||
+ if !has_asm_support && config.parse_name_directive(ln, "needs-asm-support") {
|
||||
+ props.ignore = true;
|
||||
+ }
|
||||
+
|
||||
if !rustc_has_profiler_support && config.parse_needs_profiler_support(ln) {
|
||||
props.ignore = true;
|
||||
}
|
||||
diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs
|
||||
index ec99fde0df9c2..c41b43cdd0b53 100644
|
||||
--- a/src/tools/compiletest/src/header/tests.rs
|
||||
+++ b/src/tools/compiletest/src/header/tests.rs
|
||||
@@ -223,6 +223,17 @@ fn sanitizers() {
|
||||
assert!(parse_rs(&config, "// needs-sanitizer-thread").ignore);
|
||||
}
|
||||
|
||||
+#[test]
|
||||
+fn asm_support() {
|
||||
+ let mut config = config();
|
||||
+
|
||||
+ config.target = "avr-unknown-gnu-atmega328".to_owned();
|
||||
+ assert!(parse_rs(&config, "// needs-asm-support").ignore);
|
||||
+
|
||||
+ config.target = "i686-unknown-netbsd".to_owned();
|
||||
+ assert!(!parse_rs(&config, "// needs-asm-support").ignore);
|
||||
+}
|
||||
+
|
||||
#[test]
|
||||
fn test_extract_version_range() {
|
||||
use super::{extract_llvm_version, extract_version_range};
|
||||
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
|
||||
index b302953708c18..7dbd70948b84d 100644
|
||||
--- a/src/tools/compiletest/src/util.rs
|
||||
+++ b/src/tools/compiletest/src/util.rs
|
||||
@@ -128,6 +128,15 @@ const BIG_ENDIAN: &[&str] = &[
|
||||
"sparcv9",
|
||||
];
|
||||
|
||||
+static ASM_SUPPORTED_ARCHS: &[&str] = &[
|
||||
+ "x86", "x86_64", "arm", "aarch64", "riscv32", "riscv64", "nvptx64", "hexagon", "mips",
|
||||
+ "mips64", "spirv", "wasm32",
|
||||
+];
|
||||
+
|
||||
+pub fn has_asm_support(triple: &str) -> bool {
|
||||
+ ASM_SUPPORTED_ARCHS.contains(&get_arch(triple))
|
||||
+}
|
||||
+
|
||||
pub fn matches_os(triple: &str, name: &str) -> bool {
|
||||
// For the wasm32 bare target we ignore anything also ignored on emscripten
|
||||
// and then we also recognize `wasm32-bare` as the os for the target
|
||||
30
debian/patches/u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch
vendored
Normal file
30
debian/patches/u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
commit 8d504aa90416668d8f6b4cbd449e2e1de20fb937
|
||||
Bug: https://github.com/rust-lang/rust/issues/84057
|
||||
Author: Ximin Luo <infinity0@pwned.gg>
|
||||
Date: Sun Apr 11 13:47:58 2021 +0100
|
||||
|
||||
bootstrap: check local_rebuild before adding --cfg=bootstrap, closes #84057
|
||||
|
||||
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
|
||||
index 8244c7710ab..f6f07a10842 100644
|
||||
--- a/src/bootstrap/compile.rs
|
||||
+++ b/src/bootstrap/compile.rs
|
||||
@@ -462,11 +462,14 @@ fn run(self, builder: &Builder<'_>) -> Vec<(PathBuf, DependencyType)> {
|
||||
let dst_file = &dst_dir.join(file.to_string() + ".o");
|
||||
if !up_to_date(src_file, dst_file) {
|
||||
let mut cmd = Command::new(&builder.initial_rustc);
|
||||
+ cmd.env("RUSTC_BOOTSTRAP", "1");
|
||||
+ if !builder.local_rebuild {
|
||||
+ // a local_rebuild compiler already has stage1 features
|
||||
+ cmd.arg("--cfg")
|
||||
+ .arg("bootstrap");
|
||||
+ }
|
||||
builder.run(
|
||||
- cmd.env("RUSTC_BOOTSTRAP", "1")
|
||||
- .arg("--cfg")
|
||||
- .arg("bootstrap")
|
||||
- .arg("--target")
|
||||
+ cmd.arg("--target")
|
||||
.arg(target.rustc_target_arg())
|
||||
.arg("--emit=obj")
|
||||
.arg("-o")
|
||||
Loading…
Reference in New Issue
Block a user