[llvm] [llvm-otool] Add -a option to print archive headers (PR #189411)
Ryan Mansfield via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 05:45:54 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
----------------
rjmansfield wrote:
Yes, -NEXT can be used here. I used the existing tests as a reference, but it looks like those could use -NEXT as well. Should I clean those up too?
https://github.com/llvm/llvm-project/pull/189411
More information about the llvm-commits
mailing list