[lld] e9c8242 - [lld-macho][nfc] Re-enable previously disabled test.
Vy Nguyen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 09:40:52 PST 2023
Author: Vy Nguyen
Date: 2023-01-04T12:40:14-05:00
New Revision: e9c82423939742ba85c497f16dcac6a547534b67
URL: https://github.com/llvm/llvm-project/commit/e9c82423939742ba85c497f16dcac6a547534b67
DIFF: https://github.com/llvm/llvm-project/commit/e9c82423939742ba85c497f16dcac6a547534b67.diff
LOG: [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
Added:
Modified:
lld/test/MachO/fat-arch.s
Removed:
################################################################################
diff --git a/lld/test/MachO/fat-arch.s b/lld/test/MachO/fat-arch.s
index 5609ee56e2d01..7ccf8b69dc5e7 100644
--- a/lld/test/MachO/fat-arch.s
+++ b/lld/test/MachO/fat-arch.s
@@ -19,9 +19,13 @@
# RUN: llvm-lipo %t.x86_64.out %t.arm64.out -create -o %t.fat.exec.out
# RUN: %lld -arch x86_64 %t.x86_64.o -bundle_loader %t.fat.exec.out -bundle -o %t.fat.bundle
-## FIXME: Re-enable this test, which is failing on arm64, once we figured out why
-## %t.fat.bundle is produced as an arm64.
-# RUN llvm-otool -h %t.fat.bundle -f %t.fat.exec.out | FileCheck %s --check-prefix=CPU-SUB
+# RUN: llvm-otool -h %t.fat.bundle > %t.bundle_header.txt
+# RUN: llvm-otool -f %t.fat.exec.out >> %t.bundle_header.txt
+# RUN: cat %t.bundle_header.txt | FileCheck %s --check-prefix=CPU-SUB
+
+# CPU-SUB: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
+# CPU-SUB-NEXT: 0xfeedfacf 16777223 3 0x{{.+}} {{.+}} {{.+}} {{.+}} {{.+}}
+
# CPU-SUB: Fat headers
# CPU-SUB: nfat_arch 2
# CPU-SUB: architecture 0
@@ -31,9 +35,6 @@
# CPU-SUB-NEXT: cputype 16777228
# CPU-SUB-NEXT: cpusubtype 0
-# CPU-SUB: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
-# CPU-SUB-NEXT: 0xfeedfacf 16777223 3 0x{{.+}} {{.+}} {{.+}} {{.+}} {{.+}}
-
.text
.global _main
_main:
More information about the llvm-commits
mailing list