[llvm] [bazel] Fix LLVM plugin tests under Analysis. (PR #142999)
Chenguang Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 10:09:55 PDT 2025
================
@@ -33,6 +33,80 @@ cc_test(
],
)
+cc_library(
+ name = "inline_advisor_plugin",
+ srcs = glob(["Analysis/InlineAdvisorPlugin/*.cpp"]),
+ deps = [
+ "//llvm:Analysis",
+ "//llvm:Core",
+ "//llvm:Passes",
+ "//llvm:Support",
+ ],
----------------
wecing wrote:
> Plugins shouldn't link them.
Actually, I just realized this is why I had to use separate targets for the plugin tests; if they are not linked into the plugins, there would be no duplicate flag registrations.
The right way to do this, is probably to introduce header-only versions of these four dependencies, and use them to build the plugin. But since these are just tests, I guess we are somewhat fine here...?
https://github.com/llvm/llvm-project/pull/142999
More information about the llvm-commits
mailing list