about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/compiletest/src/command-list.rs1
-rw-r--r--src/tools/compiletest/src/header/cfg.rs6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/command-list.rs b/src/tools/compiletest/src/command-list.rs
index 88e1bb56fe9..4d57907f26f 100644
--- a/src/tools/compiletest/src/command-list.rs
+++ b/src/tools/compiletest/src/command-list.rs
@@ -49,6 +49,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "ignore-eabi",
     "ignore-emscripten",
     "ignore-endian-big",
+    "ignore-enzyme",
     "ignore-freebsd",
     "ignore-fuchsia",
     "ignore-gdb",
diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs
index 6e351aa27b9..b9314f0abbb 100644
--- a/src/tools/compiletest/src/header/cfg.rs
+++ b/src/tools/compiletest/src/header/cfg.rs
@@ -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.