Skip to content

Commit a42bbd0

Browse files
committed
Move the RUSTC_PROFILER_SUPPORT check into CachedNeedsConditions
1 parent 75d01f8 commit a42bbd0

File tree

1 file changed

+3
-1
lines changed
  • src/tools/compiletest/src/header

1 file changed

+3
-1
lines changed

src/tools/compiletest/src/header/needs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub(super) fn handle_needs(
8787
},
8888
Need {
8989
name: "needs-profiler-support",
90-
condition: std::env::var_os("RUSTC_PROFILER_SUPPORT").is_some(),
90+
condition: cache.profiler_support,
9191
ignore_reason: "ignored when profiler support is disabled",
9292
},
9393
Need {
@@ -195,6 +195,7 @@ pub(super) struct CachedNeedsConditions {
195195
sanitizer_memtag: bool,
196196
sanitizer_shadow_call_stack: bool,
197197
sanitizer_safestack: bool,
198+
profiler_support: bool,
198199
xray: bool,
199200
rust_lld: bool,
200201
i686_dlltool: bool,
@@ -232,6 +233,7 @@ impl CachedNeedsConditions {
232233
sanitizer_memtag: util::MEMTAG_SUPPORTED_TARGETS.contains(target),
233234
sanitizer_shadow_call_stack: util::SHADOWCALLSTACK_SUPPORTED_TARGETS.contains(target),
234235
sanitizer_safestack: util::SAFESTACK_SUPPORTED_TARGETS.contains(target),
236+
profiler_support: std::env::var_os("RUSTC_PROFILER_SUPPORT").is_some(),
235237
xray: util::XRAY_SUPPORTED_TARGETS.contains(target),
236238

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

0 commit comments

Comments
 (0)