[llvm] [llvm-objdump] Add triple support to `mcpu=help` (PR #165661)
Ruoyu Qiu via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 1 03:07:41 PST 2025
================
@@ -0,0 +1,64 @@
+# RUN: yaml2obj %s -o %t
+# REQUIRES: arm-registered-target,x86-registered-target
+
+
+# CHECK-HELP: Available CPUs for this target:
+# CHECK-ARM: arm
+# CHECK-X86: i386
+# CHECK-HELP: Available features for this target:
+## To check we still disassemble the file:
+# CHECK-DISASM: file format elf32-littlearm
+# CHECK-SECTION-HEADER: Sections:
+# CHECK-SECTION-HEADER: Idx Name Size VMA Type
+## Don't check the OS-dependent message "No such file or directory".
+# CHECK-FILE-ISSUE: error: 'a.out':
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_ARM
+
+## 2. -d + --mcpu=help + a.out
+## Check the error if there is an issue with the file.
+# RUN: not llvm-objdump -d --mcpu=help 2>&1 \
+# RUN: | FileCheck %s --check-prefix=CHECK-FILE-ISSUE
+# RUN: not llvm-objdump -d --mattr=help 2>&1 \
+# RUN: | FileCheck %s --check-prefix=CHECK-FILE-ISSUE
+
+## Check if we can handle the default filename.
+# RUN: cp %t a.out
+# RUN: llvm-objdump -d --mcpu=help --section-headers 2>&1 \
+# RUN: | FileCheck %s --check-prefixes=CHECK-HELP,CHECK-ARM,CHECK-DISASM,CHECK-SECTION-HEADER
+# RUN: llvm-objdump -d --mattr=help --section-headers 2>&1 \
+# RUN: | FileCheck %s --check-prefixes=CHECK-HELP,CHECK-ARM,CHECK-DISASM,CHECK-SECTION-HEADER
+# RUN: rm a.out
----------------
cabbaken wrote:
Just to clarify, does this PR only require tests related to `--triple` support of `--mcpu=help` and `--mattr=help`?
https://github.com/llvm/llvm-project/pull/165661
More information about the llvm-commits
mailing list