[llvm] [CMake/Bazel] Support usage of opt driver as a library (PR #79205)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 10:51:34 PST 2024


================
@@ -29,12 +29,24 @@ set(LLVM_LINK_COMPONENTS
   Passes
   )
 
-add_llvm_tool(opt
+# We don't want to link this into libLLVM
+add_llvm_library(LLVMOptDriver
+  STATIC
----------------
nico wrote:

The usual llvlm style is to have one target per directory. If this is now a lib, could you move this into llvm/tools/opt/lib? Then you don't need the  PARTIAL_SOURCES_INTENDED below.

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


More information about the llvm-commits mailing list