diff -Nru rustc-1.53.0+dfsg1+llvm/debian/changelog rustc-1.53.0+dfsg1+llvm/debian/changelog --- rustc-1.53.0+dfsg1+llvm/debian/changelog 2021-10-18 12:16:07.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/changelog 2021-10-28 20:27:28.000000000 +0000 @@ -1,12 +1,15 @@ -rustc (1.53.0+dfsg1+llvm-1ubuntu0.21.04.1~mt1) hirsute; urgency=medium +rustc (1.53.0+dfsg1+llvm-4ubuntu1~21.04.1) hirsute; urgency=medium - * Build for hirsute + [ Michael Hudson-Doyle ] + * Backport to Hirsute. (LP: #1943842) + * Do not run tests on armhf as they hang. + * Drop adjustment of -march setting on armhf. - -- Rico Tzschichholz Mon, 18 Oct 2021 14:16:07 +0200 + -- Olivier Tilloy Thu, 28 Oct 2021 22:27:28 +0200 -rustc (1.53.0+dfsg1+llvm-1ubuntu1~ppa1) impish; urgency=medium +rustc (1.53.0+dfsg1+llvm-4ubuntu1) UNRELEASED; urgency=medium - * Merge 1.53.0+dfsg1-1 from Debian unstable (LP #1943842). + * Merge 1.53.0+dfsg1-4 from Debian unstable. (LP: #1943842) Remaining changes: - Use the bundled llvm to avoid having to do llvm updates in order to deliver rust updates @@ -40,8 +43,28 @@ Ubuntu. - Do not build windows cross compiler. - Reduce parallelism on all arches to avoid OOMs during build. + - Adjust -march setting on armhf - -- Michael Hudson-Doyle Wed, 06 Oct 2021 14:14:56 +1300 + -- Michael Hudson-Doyle Tue, 26 Oct 2021 16:04:30 +1300 + +rustc (1.53.0+dfsg1-4) unstable; urgency=medium + + * Ignore some hanging test regressions on non-release arches powerpc, ppc64. + + -- Ximin Luo Wed, 06 Oct 2021 19:24:11 +0100 + +rustc (1.53.0+dfsg1-3) unstable; urgency=medium + + * Disable patch that was backported incorrectly. + * Temporarily increase armhf allowed-failures to 12. + + -- Ximin Luo Wed, 06 Oct 2021 19:01:54 +0100 + +rustc (1.53.0+dfsg1-2) unstable; urgency=medium + + * Fix some test failures. + + -- Ximin Luo Wed, 06 Oct 2021 10:29:03 +0100 rustc (1.53.0+dfsg1-1) unstable; urgency=medium @@ -58,6 +81,46 @@ -- Ximin Luo Sat, 02 Oct 2021 12:46:49 +0100 +rustc (1.52.1+dfsg1+llvm-1ubuntu1) impish; urgency=medium + + * Merge 1.52.1+dfsg1-1 from Debian unstable. (LP: #1943842) + Remaining changes: + - Use the bundled llvm to avoid having to do llvm updates in order to + deliver rust updates + - update debian/config.toml.in + - update debian/control + - update debian/copyright + - update debian/rules + - Build-Depend on libc6-dbg on armhf, to workaround a crash in ld.so + during some debuginfo tests + - update debian/control + - Add a hack to ensure the stage0 compiler is extracted to the correct + location + - update debian/make_orig-stage0_tarball.sh + - Scrub -g from CFLAGS and CXXFLAGS in order to let rustbuild control + whether LLVM is compiled with debug symbols + - update debian/rules + - On i386, only build debuginfo for libstd + - update debian/rules + - Ignore all test failures on every architecture + - update debian/rules + - Version the Build-Conflict on gdb-minimal as gdb now Provides it + - update debian/control + - Adjust the rustc Breaks/Replaces libstd-rust-dev version to fix an + upgrade issue + - update debian/control + - Adjust debian/watch to include +llvm in upstream version. + - update debian/watch + - Add Build-Depends-Indep: libssl-dev + - Revert workaround for upstream bug #74786 + - Disable wasm build as build dependencies not currently available in + Ubuntu. + - Do not build windows cross compiler. + * Reduce parallelism on all arches to avoid OOMs during build. + * Adjust -march setting on armhf. + + -- Michael Hudson-Doyle Wed, 13 Oct 2021 14:30:46 +1300 + rustc (1.52.1+dfsg1-1) unstable; urgency=medium * Upload to unstable. diff -Nru rustc-1.53.0+dfsg1+llvm/debian/control rustc-1.53.0+dfsg1+llvm/debian/control --- rustc-1.53.0+dfsg1+llvm/debian/control 2021-10-06 01:14:07.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/control 2021-10-28 20:26:06.000000000 +0000 @@ -14,7 +14,7 @@ dpkg-dev (>= 1.17.14), python3:native, cargo:native (>= 0.40.0) , - rustc:native (>= 1.51.0+dfsg) , + rustc:native (>= 1.52.0+dfsg) , rustc:native (<= 1.53.0++) , cmake (>= 3.0) | cmake3, # needed by some vendor crates diff -Nru rustc-1.53.0+dfsg1+llvm/debian/copyright rustc-1.53.0+dfsg1+llvm/debian/copyright --- rustc-1.53.0+dfsg1+llvm/debian/copyright 2021-10-06 00:52:47.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/copyright 2021-10-28 20:25:55.000000000 +0000 @@ -4,6 +4,7 @@ Files-Excluded: *.min.js src/llvm-emscripten + src/llvm-project vendor/mdbook/src/theme/fonts vendor/mdbook/src/theme/FontAwesome vendor/mdbook/src/theme/highlight.js diff -Nru rustc-1.53.0+dfsg1+llvm/debian/patches/series rustc-1.53.0+dfsg1+llvm/debian/patches/series --- rustc-1.53.0+dfsg1+llvm/debian/patches/series 2021-10-06 00:52:47.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/patches/series 2021-10-28 20:26:33.000000000 +0000 @@ -1,6 +1,8 @@ # Patches for upstream # pending, or forwarded +#u-86383.patch +u-89591.patch u-85807.patch 0001-Revert-Auto-merge-of-79547.patch u-84752.patch @@ -9,6 +11,7 @@ u-fix-cross-compile-tools.patch # not forwarded, or forwarded but unlikely to be merged +u-ignore-ppc-hangs.patch u-ignore-endian-big-diff.patch u-rustc-llvm-cross-flags.patch u-reproducible-dl-stage0.patch diff -Nru rustc-1.53.0+dfsg1+llvm/debian/patches/u-86383.patch rustc-1.53.0+dfsg1+llvm/debian/patches/u-86383.patch --- rustc-1.53.0+dfsg1+llvm/debian/patches/u-86383.patch 1970-01-01 00:00:00.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/patches/u-86383.patch 2021-10-28 20:25:55.000000000 +0000 @@ -0,0 +1,273 @@ +From aa53928ed7b763abd882f2a5efb8f98f53ccc6a9 Mon Sep 17 00:00:00 2001 +From: Alex Vlasov +Date: Sun, 20 Jun 2021 16:09:42 +0200 +Subject: [PATCH] Squashed implementation of the pass + +--- + compiler/rustc_hir/src/lang_items.rs | 2 + + .../src/transform/lower_slice_len.rs | 100 ++++++++++++++++++ + compiler/rustc_mir/src/transform/mod.rs | 2 + + compiler/rustc_span/src/symbol.rs | 2 + + library/core/src/slice/mod.rs | 1 + + library/std/src/thread/local/tests.rs | 2 +- + ...er_slice_len.bound.LowerSliceLenCalls.diff | 63 +++++++++++ + src/test/mir-opt/lower_slice_len.rs | 14 +++ + 8 files changed, 185 insertions(+), 1 deletion(-) + create mode 100644 compiler/rustc_mir/src/transform/lower_slice_len.rs + create mode 100644 src/test/mir-opt/lower_slice_len.bound.LowerSliceLenCalls.diff + create mode 100644 src/test/mir-opt/lower_slice_len.rs + +--- a/compiler/rustc_hir/src/lang_items.rs ++++ b/compiler/rustc_hir/src/lang_items.rs +@@ -310,6 +310,8 @@ + + Try, kw::Try, try_trait, Target::Trait; + ++ SliceLen, sym::slice_len_fn, slice_len_fn, Target::Method(MethodKind::Inherent); ++ + // Language items from AST lowering + TryFromError, sym::from_error, from_error_fn, Target::Method(MethodKind::Trait { body: false }); + TryFromOk, sym::from_ok, from_ok_fn, Target::Method(MethodKind::Trait { body: false }); +--- /dev/null ++++ b/compiler/rustc_mir/src/transform/lower_slice_len.rs +@@ -0,0 +1,100 @@ ++//! This pass lowers calls to core::slice::len to just Len op. ++//! It should run before inlining! ++ ++use crate::transform::MirPass; ++use rustc_hir::def_id::DefId; ++use rustc_index::vec::IndexVec; ++use rustc_middle::mir::*; ++use rustc_middle::ty::{self, TyCtxt}; ++ ++pub struct LowerSliceLenCalls; ++ ++impl<'tcx> MirPass<'tcx> for LowerSliceLenCalls { ++ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { ++ lower_slice_len_calls(tcx, body) ++ } ++} ++ ++pub fn lower_slice_len_calls<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { ++ let language_items = tcx.lang_items(); ++ let slice_len_fn_item_def_id = if let Some(slice_len_fn_item) = language_items.slice_len_fn() { ++ slice_len_fn_item ++ } else { ++ // there is no language item to compare to :) ++ return; ++ }; ++ ++ let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut(); ++ ++ for block in basic_blocks { ++ // lower `<[_]>::len` calls ++ lower_slice_len_call(tcx, block, &*local_decls, slice_len_fn_item_def_id); ++ } ++} ++ ++struct SliceLenPatchInformation<'tcx> { ++ add_statement: Statement<'tcx>, ++ new_terminator_kind: TerminatorKind<'tcx>, ++} ++ ++fn lower_slice_len_call<'tcx>( ++ tcx: TyCtxt<'tcx>, ++ block: &mut BasicBlockData<'tcx>, ++ local_decls: &IndexVec>, ++ slice_len_fn_item_def_id: DefId, ++) { ++ let mut patch_found: Option> = None; ++ ++ let terminator = block.terminator(); ++ match &terminator.kind { ++ TerminatorKind::Call { ++ func, ++ args, ++ destination: Some((dest, bb)), ++ cleanup: None, ++ from_hir_call: true, ++ .. ++ } => { ++ // some heuristics for fast rejection ++ if args.len() != 1 { ++ return; ++ } ++ let arg = match args[0].place() { ++ Some(arg) => arg, ++ None => return, ++ }; ++ let func_ty = func.ty(local_decls, tcx); ++ match func_ty.kind() { ++ ty::FnDef(fn_def_id, _) if fn_def_id == &slice_len_fn_item_def_id => { ++ // perform modifications ++ // from something like `_5 = core::slice::::len(move _6) -> bb1` ++ // into `_5 = Len(*_6) ++ // goto bb1 ++ ++ // make new RValue for Len ++ let deref_arg = tcx.mk_place_deref(arg); ++ let r_value = Rvalue::Len(deref_arg); ++ let len_statement_kind = StatementKind::Assign(Box::new((*dest, r_value))); ++ let add_statement = Statement { ++ kind: len_statement_kind, ++ source_info: terminator.source_info.clone(), ++ }; ++ ++ // modify terminator into simple Goto ++ let new_terminator_kind = TerminatorKind::Goto { target: bb.clone() }; ++ ++ let patch = SliceLenPatchInformation { add_statement, new_terminator_kind }; ++ ++ patch_found = Some(patch); ++ } ++ _ => {} ++ } ++ } ++ _ => {} ++ } ++ ++ if let Some(SliceLenPatchInformation { add_statement, new_terminator_kind }) = patch_found { ++ block.statements.push(add_statement); ++ block.terminator_mut().kind = new_terminator_kind; ++ } ++} +--- a/compiler/rustc_mir/src/transform/mod.rs ++++ b/compiler/rustc_mir/src/transform/mod.rs +@@ -36,6 +36,7 @@ + pub mod inline; + pub mod instcombine; + pub mod lower_intrinsics; ++pub mod lower_slice_len; + pub mod match_branches; + pub mod multiple_return_terminators; + pub mod no_landing_pads; +@@ -480,6 +481,7 @@ + // to them. We run some optimizations before that, because they may be harder to do on the state + // machine than on MIR with async primitives. + let optimizations_with_generators: &[&dyn MirPass<'tcx>] = &[ ++ &lower_slice_len::LowerSliceLenCalls, // has to be done before inlining, otherwise actual call will be almost always inlined. Also simple, so can just do first + &unreachable_prop::UnreachablePropagation, + &uninhabited_enum_branching::UninhabitedEnumBranching, + &simplify::SimplifyCfg::new("after-uninhabited-enum-branching"), +--- a/compiler/rustc_span/src/symbol.rs ++++ b/compiler/rustc_span/src/symbol.rs +@@ -675,6 +675,7 @@ + lateout, + lazy_normalization_consts, + le, ++ len, + let_chains, + lhs, + lib, +@@ -1129,6 +1130,7 @@ + skip, + slice, + slice_alloc, ++ slice_len_fn, + slice_patterns, + slice_u8, + slice_u8_alloc, +--- a/library/core/src/slice/mod.rs ++++ b/library/core/src/slice/mod.rs +@@ -96,6 +96,7 @@ + /// assert_eq!(a.len(), 3); + /// ``` + #[doc(alias = "length")] ++ #[cfg_attr(not(bootstrap), lang = "slice_len_fn")] + #[stable(feature = "rust1", since = "1.0.0")] + #[rustc_const_stable(feature = "const_slice_len", since = "1.39.0")] + #[inline] +--- a/library/std/src/thread/local/tests.rs ++++ b/library/std/src/thread/local/tests.rs +@@ -297,7 +297,7 @@ + .unwrap(); + + loop { +- match SYNC_STATE.compare_exchange_weak( ++ match SYNC_STATE.compare_exchange( + THREAD1_WAITING, + MAIN_THREAD_RENDEZVOUS, + Ordering::SeqCst, +--- /dev/null ++++ b/src/test/mir-opt/lower_slice_len.bound.LowerSliceLenCalls.diff +@@ -0,0 +1,63 @@ ++- // MIR for `bound` before LowerSliceLenCalls +++ // MIR for `bound` after LowerSliceLenCalls ++ ++ fn bound(_1: usize, _2: &[u8]) -> u8 { ++ debug index => _1; // in scope 0 at $DIR/lower_slice_len.rs:4:14: 4:19 ++ debug slice => _2; // in scope 0 at $DIR/lower_slice_len.rs:4:28: 4:33 ++ let mut _0: u8; // return place in scope 0 at $DIR/lower_slice_len.rs:4:45: 4:47 ++ let mut _3: bool; // in scope 0 at $DIR/lower_slice_len.rs:5:8: 5:27 ++ let mut _4: usize; // in scope 0 at $DIR/lower_slice_len.rs:5:8: 5:13 ++ let mut _5: usize; // in scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 ++ let mut _6: &[u8]; // in scope 0 at $DIR/lower_slice_len.rs:5:16: 5:21 ++ let _7: usize; // in scope 0 at $DIR/lower_slice_len.rs:6:15: 6:20 ++ let mut _8: usize; // in scope 0 at $DIR/lower_slice_len.rs:6:9: 6:21 ++ let mut _9: bool; // in scope 0 at $DIR/lower_slice_len.rs:6:9: 6:21 ++ ++ bb0: { ++ StorageLive(_3); // scope 0 at $DIR/lower_slice_len.rs:5:8: 5:27 ++ StorageLive(_4); // scope 0 at $DIR/lower_slice_len.rs:5:8: 5:13 ++ _4 = _1; // scope 0 at $DIR/lower_slice_len.rs:5:8: 5:13 ++ StorageLive(_5); // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 ++ StorageLive(_6); // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:21 ++ _6 = &(*_2); // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:21 ++- _5 = core::slice::::len(move _6) -> bb1; // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 ++- // mir::Constant ++- // + span: $DIR/lower_slice_len.rs:5:22: 5:25 ++- // + literal: Const { ty: for<'r> fn(&'r [u8]) -> usize {core::slice::::len}, val: Value(Scalar()) } +++ _5 = Len((*_6)); // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 +++ goto -> bb1; // scope 0 at $DIR/lower_slice_len.rs:5:16: 5:27 ++ } ++ ++ bb1: { ++ StorageDead(_6); // scope 0 at $DIR/lower_slice_len.rs:5:26: 5:27 ++ _3 = Lt(move _4, move _5); // scope 0 at $DIR/lower_slice_len.rs:5:8: 5:27 ++ StorageDead(_5); // scope 0 at $DIR/lower_slice_len.rs:5:26: 5:27 ++ StorageDead(_4); // scope 0 at $DIR/lower_slice_len.rs:5:26: 5:27 ++ switchInt(move _3) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/lower_slice_len.rs:5:5: 9:6 ++ } ++ ++ bb2: { ++ StorageLive(_7); // scope 0 at $DIR/lower_slice_len.rs:6:15: 6:20 ++ _7 = _1; // scope 0 at $DIR/lower_slice_len.rs:6:15: 6:20 ++ _8 = Len((*_2)); // scope 0 at $DIR/lower_slice_len.rs:6:9: 6:21 ++ _9 = Lt(_7, _8); // scope 0 at $DIR/lower_slice_len.rs:6:9: 6:21 ++ assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb4; // scope 0 at $DIR/lower_slice_len.rs:6:9: 6:21 ++ } ++ ++ bb3: { ++ _0 = const 42_u8; // scope 0 at $DIR/lower_slice_len.rs:8:9: 8:11 ++ goto -> bb5; // scope 0 at $DIR/lower_slice_len.rs:5:5: 9:6 ++ } ++ ++ bb4: { ++ _0 = (*_2)[_7]; // scope 0 at $DIR/lower_slice_len.rs:6:9: 6:21 ++ StorageDead(_7); // scope 0 at $DIR/lower_slice_len.rs:7:5: 7:6 ++ goto -> bb5; // scope 0 at $DIR/lower_slice_len.rs:5:5: 9:6 ++ } ++ ++ bb5: { ++ StorageDead(_3); // scope 0 at $DIR/lower_slice_len.rs:9:5: 9:6 ++ return; // scope 0 at $DIR/lower_slice_len.rs:10:2: 10:2 ++ } ++ } ++ +--- /dev/null ++++ b/src/test/mir-opt/lower_slice_len.rs +@@ -0,0 +1,14 @@ ++// compile-flags: -Z mir-opt-level=3 ++ ++// EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff ++pub fn bound(index: usize, slice: &[u8]) -> u8 { ++ if index < slice.len() { ++ slice[index] ++ } else { ++ 42 ++ } ++} ++ ++fn main() { ++ let _ = bound(1, &[1, 2, 3]); ++} diff -Nru rustc-1.53.0+dfsg1+llvm/debian/patches/u-89591.patch rustc-1.53.0+dfsg1+llvm/debian/patches/u-89591.patch --- rustc-1.53.0+dfsg1+llvm/debian/patches/u-89591.patch 1970-01-01 00:00:00.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/patches/u-89591.patch 2021-10-28 20:25:55.000000000 +0000 @@ -0,0 +1,19 @@ +From b386959aca1fd25431b8f58b96ddefa556a4bd27 Mon Sep 17 00:00:00 2001 +From: Ximin Luo +Date: Wed, 6 Oct 2021 10:22:03 +0100 +Subject: [PATCH] fix: alloc-optimisation is only for rust llvm + +--- + src/test/codegen/alloc-optimisation.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/test/codegen/alloc-optimisation.rs b/src/test/codegen/alloc-optimisation.rs +index 5b27f3f45457d..aee93b93e3737 100644 +--- a/src/test/codegen/alloc-optimisation.rs ++++ b/src/test/codegen/alloc-optimisation.rs +@@ -1,4 +1,5 @@ + // ++// no-system-llvm + // min-llvm-version: 10.0.1 + // compile-flags: -O + #![crate_type="lib"] diff -Nru rustc-1.53.0+dfsg1+llvm/debian/patches/u-ignore-ppc-hangs.patch rustc-1.53.0+dfsg1+llvm/debian/patches/u-ignore-ppc-hangs.patch --- rustc-1.53.0+dfsg1+llvm/debian/patches/u-ignore-ppc-hangs.patch 1970-01-01 00:00:00.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/patches/u-ignore-ppc-hangs.patch 2021-10-28 20:25:55.000000000 +0000 @@ -0,0 +1,22 @@ +Bug: https://github.com/rust-lang/rust/issues/89607 + +--- a/library/alloc/tests/arc.rs ++++ b/library/alloc/tests/arc.rs +@@ -96,6 +96,7 @@ + + fn assert_trusted_len(_: &I) {} + ++#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] + #[test] + fn shared_from_iter_normal() { + // Exercise the base implementation for non-`TrustedLen` iterators. +--- a/library/alloc/tests/rc.rs ++++ b/library/alloc/tests/rc.rs +@@ -92,6 +92,7 @@ + + fn assert_trusted_len(_: &I) {} + ++#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] + #[test] + fn shared_from_iter_normal() { + // Exercise the base implementation for non-`TrustedLen` iterators. diff -Nru rustc-1.53.0+dfsg1+llvm/debian/rules rustc-1.53.0+dfsg1+llvm/debian/rules --- rustc-1.53.0+dfsg1+llvm/debian/rules 2021-10-06 00:54:31.000000000 +0000 +++ rustc-1.53.0+dfsg1+llvm/debian/rules 2021-10-28 20:26:33.000000000 +0000 @@ -32,8 +32,11 @@ DEB_DESTDIR := $(CURDIR)/debian/tmp -RUSTBUILD = RUST_BACKTRACE=1 python3 src/bootstrap/bootstrap.py -RUSTBUILD_FLAGS = -j 2 --stage 2 --config debian/config.toml -vvv --on-fail env +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NJOBS := -j 2 +endif +RUSTBUILD = RUST_BACKTRACE=1 python3 src/bootstrap/bootstrap.py $(NJOBS) +RUSTBUILD_FLAGS = --stage 2 --config debian/config.toml -vvv --on-fail env RUSTBUILD_TEST = $(RUSTBUILD) test --no-fail-fast # To run a specific test, run something like: # $ debian/rules override_dh_auto_test-arch \ @@ -228,12 +231,14 @@ override_dh_auto_test-arch: ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) +ifeq (,$(filter $(DEB_BUILD_ARCH), armhf)) $(call RUN_TESTS,$(RUSTBUILD_TEST) $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS)) # don't continue if RUSTBUILD_TEST_FLAGS is non-empty test -z "$(RUSTBUILD_TEST_FLAGS)" # don't run windows tests yet endif endif +endif override_dh_auto_test-indep: ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES)))