Cleanup and update to rustc 2023-06-19
This commit is contained in:
parent
3d7ec5923d
commit
607cbfda14
@ -1,27 +0,0 @@
|
|||||||
From 8d5e85607d3d52f920990334ae1cfa9798ad9259 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Antoni Boucher <bouanto@zoho.com>
|
|
||||||
Date: Thu, 8 Jun 2023 17:27:34 -0400
|
|
||||||
Subject: [PATCH] Allow overwriting the sysroot compile flag via --rustc-args
|
|
||||||
|
|
||||||
---
|
|
||||||
src/tools/compiletest/src/runtest.rs | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
|
|
||||||
index 6582b534488..d16a7d66154 100644
|
|
||||||
--- a/src/tools/compiletest/src/runtest.rs
|
|
||||||
+++ b/src/tools/compiletest/src/runtest.rs
|
|
||||||
@@ -1951,7 +1951,9 @@ fn make_compile_args(
|
|
||||||
rustc.arg("-Ztranslate-remapped-path-to-local-path=no");
|
|
||||||
|
|
||||||
// Optionally prevent default --sysroot if specified in test compile-flags.
|
|
||||||
- if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) {
|
|
||||||
+ if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot"))
|
|
||||||
+ && !self.config.host_rustcflags.iter().any(|flag| flag == "--sysroot")
|
|
||||||
+ {
|
|
||||||
// In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot.
|
|
||||||
rustc.arg("--sysroot").arg(&self.config.sysroot_base);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
@ -28,12 +28,3 @@ fi
|
|||||||
# Copy files to sysroot
|
# Copy files to sysroot
|
||||||
mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
|
mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
|
||||||
cp -r target/$TARGET_TRIPLE/$sysroot_channel/deps/* sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
|
cp -r target/$TARGET_TRIPLE/$sysroot_channel/deps/* sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
|
||||||
|
|
||||||
# Since we can't override the sysroot for the UI tests anymore, we create a new toolchain and manually overwrite the sysroot directory.
|
|
||||||
# TODO: to remove.
|
|
||||||
#rust_toolchain=$(cat ../rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
|
|
||||||
#my_toolchain_dir=$HOME/.rustup/toolchains/codegen_gcc_ui_tests-$rust_toolchain-$TARGET_TRIPLE
|
|
||||||
#rm -rf $my_toolchain_dir
|
|
||||||
#cp -r $HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE $my_toolchain_dir
|
|
||||||
#rm -rf $my_toolchain_dir/lib/rustlib/$TARGET_TRIPLE/
|
|
||||||
#cp -r ../build_sysroot/sysroot/* $my_toolchain_dir
|
|
||||||
|
@ -504,7 +504,10 @@ pub fn new(val: T) -> Box<T> {
|
|||||||
|
|
||||||
impl<T: ?Sized, A: Allocator> Drop for Box<T, A> {
|
impl<T: ?Sized, A: Allocator> Drop for Box<T, A> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// drop is currently performed by compiler.
|
// inner value is dropped by compiler.
|
||||||
|
unsafe {
|
||||||
|
libc::free(self.0.pointer.0 as *mut u8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,11 +524,6 @@ unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
|
|||||||
libc::malloc(size)
|
libc::malloc(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[lang = "box_free"]
|
|
||||||
unsafe fn box_free<T: ?Sized>(ptr: Unique<T>, _alloc: ()) {
|
|
||||||
libc::free(ptr.pointer.0 as *mut u8);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[lang = "drop"]
|
#[lang = "drop"]
|
||||||
pub trait Drop {
|
pub trait Drop {
|
||||||
fn drop(&mut self);
|
fn drop(&mut self);
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
From dd82e95c9de212524e14fc60155de1ae40156dfc Mon Sep 17 00:00:00 2001
|
|
||||||
From: bjorn3 <bjorn3@users.noreply.github.com>
|
|
||||||
Date: Sun, 24 Nov 2019 15:34:06 +0100
|
|
||||||
Subject: [PATCH] [core] Ignore failing tests
|
|
||||||
|
|
||||||
---
|
|
||||||
library/core/tests/iter.rs | 4 ++++
|
|
||||||
library/core/tests/num/bignum.rs | 10 ++++++++++
|
|
||||||
library/core/tests/num/mod.rs | 5 +++--
|
|
||||||
library/core/tests/time.rs | 1 +
|
|
||||||
4 files changed, 18 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/library/core/tests/array.rs b/library/core/tests/array.rs
|
|
||||||
index 4bc44e9..8e3c7a4 100644
|
|
||||||
--- a/library/core/tests/array.rs
|
|
||||||
+++ b/library/core/tests/array.rs
|
|
||||||
@@ -242,6 +242,7 @@ fn iterator_drops() {
|
|
||||||
assert_eq!(i.get(), 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/*
|
|
||||||
// This test does not work on targets without panic=unwind support.
|
|
||||||
// To work around this problem, test is marked is should_panic, so it will
|
|
||||||
// be automagically skipped on unsuitable targets, such as
|
|
||||||
@@ -283,6 +284,7 @@ fn array_default_impl_avoids_leaks_on_panic() {
|
|
||||||
assert_eq!(COUNTER.load(Relaxed), 0);
|
|
||||||
panic!("test succeeded")
|
|
||||||
}
|
|
||||||
+*/
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn empty_array_is_always_default() {
|
|
||||||
@@ -304,6 +304,7 @@ fn array_map() {
|
|
||||||
assert_eq!(b, [1, 2, 3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/*
|
|
||||||
// See note on above test for why `should_panic` is used.
|
|
||||||
#[test]
|
|
||||||
#[should_panic(expected = "test succeeded")]
|
|
||||||
@@ -332,6 +333,7 @@ fn array_map_drop_safety() {
|
|
||||||
assert_eq!(DROPPED.load(Ordering::SeqCst), num_to_create);
|
|
||||||
panic!("test succeeded")
|
|
||||||
}
|
|
||||||
+*/
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn cell_allows_array_cycle() {
|
|
||||||
-- 2.21.0 (Apple Git-122)
|
|
@ -1,3 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2023-06-10"
|
channel = "nightly-2023-06-19"
|
||||||
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
|
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
|
||||||
|
@ -108,6 +108,10 @@ fn const_u64(&self, i: u64) -> RValue<'gcc> {
|
|||||||
self.const_uint(self.type_u64(), i)
|
self.const_uint(self.type_u64(), i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn const_u128(&self, i: u128) -> RValue<'gcc> {
|
||||||
|
self.const_uint_big(self.type_u128(), i)
|
||||||
|
}
|
||||||
|
|
||||||
fn const_usize(&self, i: u64) -> RValue<'gcc> {
|
fn const_usize(&self, i: u64) -> RValue<'gcc> {
|
||||||
let bit_size = self.data_layout().pointer_size.bits();
|
let bit_size = self.data_layout().pointer_size.bits();
|
||||||
if bit_size < 64 {
|
if bit_size < 64 {
|
||||||
|
7
test.sh
7
test.sh
@ -209,13 +209,10 @@ function setup_rustc() {
|
|||||||
cd rust
|
cd rust
|
||||||
git fetch
|
git fetch
|
||||||
git checkout $(rustc -V | cut -d' ' -f3 | tr -d '(')
|
git checkout $(rustc -V | cut -d' ' -f3 | tr -d '(')
|
||||||
git am ../0001-Allow-overwriting-the-sysroot-compile-flag-via-rustc.patch
|
|
||||||
export RUSTFLAGS=
|
export RUSTFLAGS=
|
||||||
|
|
||||||
rm config.toml || true
|
rm config.toml || true
|
||||||
|
|
||||||
my_toolchain_dir=$HOME/.rustup/toolchains/codegen_gcc_ui_tests-$rust_toolchain-$TARGET_TRIPLE
|
|
||||||
|
|
||||||
cat > config.toml <<EOF
|
cat > config.toml <<EOF
|
||||||
changelog-seen = 2
|
changelog-seen = 2
|
||||||
|
|
||||||
@ -223,12 +220,9 @@ changelog-seen = 2
|
|||||||
codegen-backends = []
|
codegen-backends = []
|
||||||
deny-warnings = false
|
deny-warnings = false
|
||||||
|
|
||||||
# FIXME: it works with the original rustc and cargo.
|
|
||||||
[build]
|
[build]
|
||||||
#cargo = "$my_toolchain_dir/bin/cargo"
|
|
||||||
cargo = "$(rustup which cargo)"
|
cargo = "$(rustup which cargo)"
|
||||||
local-rebuild = true
|
local-rebuild = true
|
||||||
#rustc = "$my_toolchain_dir/bin/rustc"
|
|
||||||
rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
|
rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
|
||||||
|
|
||||||
[target.x86_64-unknown-linux-gnu]
|
[target.x86_64-unknown-linux-gnu]
|
||||||
@ -394,7 +388,6 @@ function test_rustc() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[TEST] rustc test suite"
|
echo "[TEST] rustc test suite"
|
||||||
# FIXME: the problem seems like an ABI incompatibility between cg_gcc sysroot and cg_llvm.
|
|
||||||
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui --rustc-args "$RUSTC_ARGS"
|
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui --rustc-args "$RUSTC_ARGS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user