Skip to content

Commit

Permalink
add config to explicitely test rustc with autodiff/enzyme disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuseZ4 committed Oct 10, 2024
1 parent a1eceec commit b12dc20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/compiletest/src/command-list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-eabi",
"ignore-emscripten",
"ignore-endian-big",
"ignore-enzyme",
"ignore-freebsd",
"ignore-fuchsia",
"ignore-gdb",
Expand Down
6 changes: 6 additions & 0 deletions src/tools/compiletest/src/header/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ pub(super) fn parse_cfg_name_directive<'a>(
message: "when the target vendor is Apple"
}

condition! {
name: "enzyme",
condition: config.has_enzyme,
message: "when rustc is built with LLVM Enzyme"
}

// Technically the locally built compiler uses the "dev" channel rather than the "nightly"
// channel, even though most people don't know or won't care about it. To avoid confusion, we
// treat the "dev" channel as the "nightly" channel when processing the directive.
Expand Down

0 comments on commit b12dc20

Please sign in to comment.