mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
compiletest: load supports-xray from target spec
This commit is contained in:
parent
64e27cb4d9
commit
34c248d31f
@ -578,6 +578,8 @@ pub struct TargetCfg {
|
||||
pub(crate) dynamic_linking: bool,
|
||||
#[serde(rename = "supported-sanitizers", default)]
|
||||
pub(crate) sanitizers: Vec<Sanitizer>,
|
||||
#[serde(rename = "supports-xray", default)]
|
||||
pub(crate) xray: bool,
|
||||
}
|
||||
|
||||
impl TargetCfg {
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::common::{Config, Debugger, Sanitizer};
|
||||
use crate::header::IgnoreDecision;
|
||||
use crate::util;
|
||||
|
||||
pub(super) fn handle_needs(
|
||||
cache: &CachedNeedsConditions,
|
||||
@ -235,7 +234,7 @@ impl CachedNeedsConditions {
|
||||
sanitizer_shadow_call_stack: sanitizers.contains(&Sanitizer::ShadowCallStack),
|
||||
sanitizer_safestack: sanitizers.contains(&Sanitizer::Safestack),
|
||||
profiler_support: std::env::var_os("RUSTC_PROFILER_SUPPORT").is_some(),
|
||||
xray: util::XRAY_SUPPORTED_TARGETS.contains(target),
|
||||
xray: config.target_cfg().xray,
|
||||
|
||||
// For tests using the `needs-rust-lld` directive (e.g. for `-Zgcc-ld=lld`), we need to find
|
||||
// whether `rust-lld` is present in the compiler under test.
|
||||
|
@ -9,19 +9,6 @@ use tracing::*;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub const XRAY_SUPPORTED_TARGETS: &[&str] = &[
|
||||
"aarch64-linux-android",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-musl",
|
||||
"x86_64-linux-android",
|
||||
"x86_64-unknown-freebsd",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-unknown-linux-musl",
|
||||
"x86_64-unknown-netbsd",
|
||||
"x86_64-unknown-none-linuxkernel",
|
||||
"x86_64-unknown-openbsd",
|
||||
];
|
||||
|
||||
pub fn make_new_path(path: &str) -> String {
|
||||
assert!(cfg!(windows));
|
||||
// Windows just uses PATH as the library search path, so we have to
|
||||
|
Loading…
Reference in New Issue
Block a user