Skip to content

Commit e9c8242

Browse files
committed
[lld-macho][nfc] Re-enable previously disabled test.
This check was previous disabled because the test kept failing on ARM64. The output from reported failure message gave the impression that the bundle was created as an x86-64 bundle but upon further inspection, I believe that's a bug in llvm-otool where it prints both -h and -f for both input files on ARM64. So the "fix" here is to rewrite the test to run the two otool commands separately but concatenate the output into one file for checking. Differential Revision: https://reviews.llvm.org/D140987
1 parent 0909040 commit e9c8242

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lld/test/MachO/fat-arch.s

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@
1919
# RUN: llvm-lipo %t.x86_64.out %t.arm64.out -create -o %t.fat.exec.out
2020
# RUN: %lld -arch x86_64 %t.x86_64.o -bundle_loader %t.fat.exec.out -bundle -o %t.fat.bundle
2121

22-
## FIXME: Re-enable this test, which is failing on arm64, once we figured out why
23-
## %t.fat.bundle is produced as an arm64.
24-
# RUN llvm-otool -h %t.fat.bundle -f %t.fat.exec.out | FileCheck %s --check-prefix=CPU-SUB
22+
# RUN: llvm-otool -h %t.fat.bundle > %t.bundle_header.txt
23+
# RUN: llvm-otool -f %t.fat.exec.out >> %t.bundle_header.txt
24+
# RUN: cat %t.bundle_header.txt | FileCheck %s --check-prefix=CPU-SUB
25+
26+
# CPU-SUB: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
27+
# CPU-SUB-NEXT: 0xfeedfacf 16777223 3 0x{{.+}} {{.+}} {{.+}} {{.+}} {{.+}}
28+
2529
# CPU-SUB: Fat headers
2630
# CPU-SUB: nfat_arch 2
2731
# CPU-SUB: architecture 0
@@ -31,9 +35,6 @@
3135
# CPU-SUB-NEXT: cputype 16777228
3236
# CPU-SUB-NEXT: cpusubtype 0
3337

34-
# CPU-SUB: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
35-
# CPU-SUB-NEXT: 0xfeedfacf 16777223 3 0x{{.+}} {{.+}} {{.+}} {{.+}} {{.+}}
36-
3738
.text
3839
.global _main
3940
_main:

0 commit comments

Comments
 (0)