[llvm] [llvm-objdump] Add triple support to `mcpu=help` (PR #165661)

Ruoyu Qiu via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 2 17:39:06 PST 2025


================
@@ -3826,6 +3841,10 @@ int llvm_objdump_main(int argc, char **argv, const llvm::ToolContext &) {
       !DisassembleSymbols.empty())
     Disassemble = true;
 
+  if (!Disassemble && MCPU == "help") {
+    return MCPUHelp();
+  }
----------------
cabbaken wrote:

I am wondering if the check (`if (!Disassemble && MCPU == "help")`) should be as extensive as the longer conditional block (or put this logic into the body of long conditional check). For example, executing `llvm-objdump --triple=x86_64 --mcpu=help --all-headers` currently does not provide the list of CPUs and features.

This Pull Request is only intended to provide an easier way for users to employ the `--mcpu=help` option. Given this goal, is it necessary to check all of the other conditions?

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


More information about the llvm-commits mailing list