[llvm] [CodeGen] Expose the extensibility of PassConfig to plugins (PR #139059)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 07:06:11 PDT 2025


================
@@ -0,0 +1,16 @@
+if (NOT WIN32 AND NOT CYGWIN)
+	unset(LLVM_LINK_COMPONENTS)
+	add_llvm_library(CGTestPlugin MODULE BUILDTREE_ONLY
+			CodeGenTestPass.cpp
+			Plugin.cpp
+	)
+
+	# Put PLUGIN next to the unit test executable.
+	set_output_directory(CGTestPlugin
+			BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../
+			LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../
+	)
----------------
weliveindetail wrote:

Grepping for `Put PLUGIN next to the unit test` I find 4 other plugin unittests that do exactly this

https://github.com/llvm/llvm-project/pull/139059


More information about the llvm-commits mailing list