Skip to content

Commit b12dc20

Browse files
committed
add config to explicitely test rustc with autodiff/enzyme disabled
1 parent a1eceec commit b12dc20

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/tools/compiletest/src/command-list.rs

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
4949
"ignore-eabi",
5050
"ignore-emscripten",
5151
"ignore-endian-big",
52+
"ignore-enzyme",
5253
"ignore-freebsd",
5354
"ignore-fuchsia",
5455
"ignore-gdb",

src/tools/compiletest/src/header/cfg.rs

+6
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ pub(super) fn parse_cfg_name_directive<'a>(
166166
message: "when the target vendor is Apple"
167167
}
168168

169+
condition! {
170+
name: "enzyme",
171+
condition: config.has_enzyme,
172+
message: "when rustc is built with LLVM Enzyme"
173+
}
174+
169175
// Technically the locally built compiler uses the "dev" channel rather than the "nightly"
170176
// channel, even though most people don't know or won't care about it. To avoid confusion, we
171177
// treat the "dev" channel as the "nightly" channel when processing the directive.

0 commit comments

Comments
 (0)