From b12dc2091012d1e8074ccea0ffe6ac16de1ba802 Mon Sep 17 00:00:00 2001 From: Manuel Drehwald Date: Thu, 10 Oct 2024 11:38:28 +0200 Subject: [PATCH] add config to explicitely test rustc with autodiff/enzyme disabled --- src/tools/compiletest/src/command-list.rs | 1 + src/tools/compiletest/src/header/cfg.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/tools/compiletest/src/command-list.rs b/src/tools/compiletest/src/command-list.rs index 53db55d0c10..ab57320b4d9 100644 --- a/src/tools/compiletest/src/command-list.rs +++ b/src/tools/compiletest/src/command-list.rs @@ -49,6 +49,7 @@ "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 @@ macro_rules! condition { 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.