mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 12:36:47 +00:00
Rollup merge of #116263 - ferrocene:pa-more-bare-metal-fixes, r=oli-obk
More fixes for running the test suite on a bare metal target This PR adds more fixes needed to run the test suite on bare metal targets (in this case, without unwinding and with static relocations). There is no CI job exercising tests without unwinds, but I can confirm this worked in Ferrocene's CI.
This commit is contained in:
commit
3ee2c526df
@ -580,6 +580,8 @@ pub struct TargetCfg {
|
||||
pub(crate) sanitizers: Vec<Sanitizer>,
|
||||
#[serde(rename = "supports-xray", default)]
|
||||
pub(crate) xray: bool,
|
||||
#[serde(default = "default_reloc_model")]
|
||||
pub(crate) relocation_model: String,
|
||||
}
|
||||
|
||||
impl TargetCfg {
|
||||
@ -592,6 +594,10 @@ fn default_os() -> String {
|
||||
"none".into()
|
||||
}
|
||||
|
||||
fn default_reloc_model() -> String {
|
||||
"pic".into()
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, Default, serde::Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum Endian {
|
||||
|
@ -134,6 +134,11 @@ pub(super) fn handle_needs(
|
||||
condition: config.target_cfg().dynamic_linking,
|
||||
ignore_reason: "ignored on targets without dynamic linking",
|
||||
},
|
||||
Need {
|
||||
name: "needs-relocation-model-pic",
|
||||
condition: config.target_cfg().relocation_model == "pic",
|
||||
ignore_reason: "ignored on targets without PIC relocation model",
|
||||
},
|
||||
];
|
||||
|
||||
let (name, comment) = match ln.split_once([':', ' ']) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
// needs-unwind
|
||||
// revisions:cfail1 cfail2
|
||||
// compile-flags: -Z query-dep-graph -Cpanic=unwind
|
||||
// needs-unwind
|
||||
// build-pass (FIXME(62277): could be check-pass?)
|
||||
|
||||
#![feature(panic_unwind)]
|
||||
|
@ -1,7 +1,6 @@
|
||||
// run-pass
|
||||
// compile-flags: -C relocation-model=pic
|
||||
// ignore-emscripten no pic
|
||||
// ignore-wasm
|
||||
// needs-relocation-model-pic
|
||||
|
||||
#![feature(cfg_relocation_model)]
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
// run-fail
|
||||
// check-run-results
|
||||
// exec-env:RUST_BACKTRACE=1
|
||||
// needs-unwind
|
||||
// ignore-android FIXME #17520
|
||||
// ignore-wasm no panic support
|
||||
// ignore-openbsd no support for libbacktrace without filename
|
||||
|
@ -1,4 +1,4 @@
|
||||
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:56:5:
|
||||
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:57:5:
|
||||
debug!!!
|
||||
stack backtrace:
|
||||
0: std::panicking::begin_panic
|
||||
|
@ -2,6 +2,7 @@
|
||||
// run-fail
|
||||
// check-run-results
|
||||
// exec-env:RUST_BACKTRACE=1
|
||||
// needs-unwind
|
||||
// ignore-android FIXME #17520
|
||||
// ignore-wasm no panic support
|
||||
// ignore-openbsd no support for libbacktrace without filename
|
||||
|
@ -1,4 +1,4 @@
|
||||
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:52:5:
|
||||
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:53:5:
|
||||
debug!!!
|
||||
stack backtrace:
|
||||
0: std::panicking::begin_panic
|
||||
|
Loading…
Reference in New Issue
Block a user