[clang] [compiler-rt] [llvm] Migrate llvm-profdata to Opt flag parsing (PR #177868)

Prabhu Rajasekaran via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 20:19:08 PST 2026


================
@@ -2,14 +2,23 @@ set(LLVM_LINK_COMPONENTS
   Core
   Object
   ProfileData
+  Option
   Support
   )
 
+set(LLVM_TARGET_DEFINITIONS Opts.td)
+tablegen(LLVM Opts.inc -gen-opt-parser-defs)
+add_public_tablegen_target(ProfdataOptsTableGen)
+
 add_llvm_tool(llvm-profdata
   llvm-profdata.cpp
 
   DEPENDS
   intrinsics_gen
+  ProfdataOptsTableGen
+  GENERATE_DRIVER
   )
 
-target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod)
+if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
----------------
Prabhuk wrote:

This can be broken out into a different follow up patch after migration to opttable. It is preferable to piece meal changes. If something goes wrong it will prevent the entire patch from being reverted as well.

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


More information about the cfe-commits mailing list