mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
compiletest: load supports-xray from target spec
This commit is contained in:
@@ -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 @@ pub(super) fn load(config: &Config) -> Self {
|
||||
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 @@
|
||||
#[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
|
||||
|
||||
Reference in New Issue
Block a user