[llvm] [llvm][test][CGPluginTest] Fix missing `plugins` in test requirements (PR #215010)

Seth Junot via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 12:27:06 PDT 2026


https://github.com/xSetech created https://github.com/llvm/llvm-project/pull/215010

CGTestPlugin.so is only built when LLVM_ENABLE_PLUGINS is ON, so under this configuration the test will still run but without llc able to load the plugin and emit the expected message:
- LLVM_LINK_LLVM_DYLIB=ON (`llvm-dylib` set)
- LLVM_ENABLE_PLUGINS=OFF (`plugins` unset)

This changes the test so that it's only run when CGTestPlugin.so would have been built and is marked unsupported otherwise.

>From 184cd1113b0c54263f382e30f3a64cde3c1519ad Mon Sep 17 00:00:00 2001
From: Seth Junot <xsetech at gmail.com>
Date: Sat, 8 Aug 2026 11:52:52 -0700
Subject: [PATCH] [llvm][test][CGPluginTest] Fix missing `plugins` in test
 requirements

CGTestPlugin.so is only built when LLVM_ENABLE_PLUGINS is ON, so
under this configuration the test will still run but without llc
able to load the plugin and emit the expected message:
- LLVM_LINK_LLVM_DYLIB=ON (`llvm-dylib` set)
- LLVM_ENABLE_PLUGINS=OFF (`plugins` unset)

This changes the test so that it's only run when CGTestPlugin.so would
have been built and is marked unsupported otherwise.
---
 llvm/test/Other/codegen-plugin-loading.ll | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/test/Other/codegen-plugin-loading.ll b/llvm/test/Other/codegen-plugin-loading.ll
index 7a8b724462735..5a1c8f869348f 100644
--- a/llvm/test/Other/codegen-plugin-loading.ll
+++ b/llvm/test/Other/codegen-plugin-loading.ll
@@ -1,5 +1,5 @@
 ; RUN: llc -load %llvmshlibdir/CGTestPlugin%pluginext %s -o - | FileCheck %s
-; REQUIRES: native, system-linux, llvm-dylib
+; REQUIRES: native, system-linux, llvm-dylib, plugins
 
 ; CHECK: CodeGen Test Pass running on main
 define void @main() {



More information about the llvm-commits mailing list