Skip to content

Commit

Permalink
Move the RUSTC_PROFILER_SUPPORT check into CachedNeedsConditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed Jun 28, 2023
1 parent 75d01f8 commit a42bbd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tools/compiletest/src/header/needs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub(super) fn handle_needs(
},
Need {
name: "needs-profiler-support",
condition: std::env::var_os("RUSTC_PROFILER_SUPPORT").is_some(),
condition: cache.profiler_support,
ignore_reason: "ignored when profiler support is disabled",
},
Need {
Expand Down Expand Up @@ -195,6 +195,7 @@ pub(super) struct CachedNeedsConditions {
sanitizer_memtag: bool,
sanitizer_shadow_call_stack: bool,
sanitizer_safestack: bool,
profiler_support: bool,
xray: bool,
rust_lld: bool,
i686_dlltool: bool,
Expand Down Expand Up @@ -232,6 +233,7 @@ impl CachedNeedsConditions {
sanitizer_memtag: util::MEMTAG_SUPPORTED_TARGETS.contains(target),
sanitizer_shadow_call_stack: util::SHADOWCALLSTACK_SUPPORTED_TARGETS.contains(target),
sanitizer_safestack: util::SAFESTACK_SUPPORTED_TARGETS.contains(target),
profiler_support: std::env::var_os("RUSTC_PROFILER_SUPPORT").is_some(),
xray: util::XRAY_SUPPORTED_TARGETS.contains(target),

// For tests using the `needs-rust-lld` directive (e.g. for `-Zgcc-ld=lld`), we need to find
Expand Down

0 comments on commit a42bbd0

Please sign in to comment.