[llvm] [llvm-otool] Add -a option to print archive headers (PR #189411)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 06:15:06 PDT 2026
================
@@ -5,6 +5,17 @@ RUN: | FileCheck %s -check-prefix=OFFSETS
RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 --macho --archive-headers --arch all --non-verbose \
RUN: | FileCheck %s -check-prefix=NON-VERBOSE
+# llvm-otool -a shows all architectures by default.
+RUN: llvm-otool -a %p/Inputs/macho-universal-archive.x86_64.i386 \
+RUN: | FileCheck %s -check-prefix=NON-VERBOSE
+
+# llvm-otool -a -arch filters to one slice.
+RUN: llvm-otool -a -arch x86_64 %p/Inputs/macho-universal-archive.x86_64.i386 \
+RUN: | FileCheck %s -check-prefix=OTOOL-ARCH --implicit-check-not="(architecture i386)"
+OTOOL-ARCH: Archive : {{.*}}macho-universal-archive.x86_64.i386
+OTOOL-ARCH: 0100644 124/11 44
+OTOOL-ARCH: 0100644 124/0 860
----------------
jh7370 wrote:
Probably best keep that to a separate PR (either pre or post this one, either is fine). If you do post, I'd still do -NEXT in this one for the new case.
https://github.com/llvm/llvm-project/pull/189411
More information about the llvm-commits
mailing list