|
1 |
| -# REQUIRES: x86,aarch64 |
2 |
| -## FIXME: The tests doesn't run on windows right now because of llvm-mc (can't produce triple=arm64-apple-macos11.0) |
3 |
| -# UNSUPPORTED: system-windows |
4 |
| - |
| 1 | +# REQUIRES: x86 |
5 | 2 | # RUN: llvm-mc -filetype=obj -triple=i386-apple-darwin %s -o %t.i386.o
|
6 | 3 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.x86_64.o
|
7 |
| -# RUN: llvm-mc -filetype=obj -triple=arm64-apple-macos11.0 %s -o %t.arm64.o |
8 |
| - |
9 | 4 | # RUN: llvm-lipo %t.i386.o %t.x86_64.o -create -o %t.fat.o
|
10 | 5 | # RUN: %lld -o /dev/null %t.fat.o
|
| 6 | + |
11 | 7 | # RUN: llvm-lipo %t.i386.o -create -o %t.noarch.o
|
12 | 8 | # RUN: not %lld -o /dev/null %t.noarch.o 2>&1 | \
|
13 | 9 | # RUN: FileCheck %s -DFILE=%t.noarch.o
|
14 | 10 | # CHECK: error: unable to find matching architecture in [[FILE]]
|
15 | 11 |
|
16 |
| -## Validates that we read the cpu-subtype correctly from a fat exec. |
17 |
| -# RUN: %lld -o %t.x86_64.out %t.x86_64.o |
18 |
| -# RUN: %lld -arch arm64 -o %t.arm64.out %t.arm64.o |
19 |
| -# RUN: llvm-lipo %t.x86_64.out %t.arm64.out -create -o %t.fat.exec.out |
20 |
| -# RUN: %lld %t.x86_64.o -bundle_loader %t.fat.exec.out -bundle -o %t.fat.bundle |
21 |
| - |
22 |
| -# RUN: llvm-otool -h %t.fat.bundle -f %t.fat.exec.out | FileCheck %s --check-prefix=CPU-SUB |
23 |
| -# CPU-SUB: Fat headers |
24 |
| -# CPU-SUB: nfat_arch 2 |
25 |
| -# CPU-SUB: architecture 0 |
26 |
| -# CPU-SUB-NEXT: cputype 16777223 |
27 |
| -# CPU-SUB-NEXT: cpusubtype 3 |
28 |
| -# CPU-SUB: architecture 1 |
29 |
| -# CPU-SUB-NEXT: cputype 16777228 |
30 |
| -# CPU-SUB-NEXT: cpusubtype 0 |
31 |
| - |
32 |
| -# CPU-SUB: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags |
33 |
| -# CPU-SUB-NEXT: 0xfeedfacf 16777223 3 0x{{.+}} {{.+}} {{.+}} {{.+}} {{.+}} |
34 |
| - |
35 | 12 | .text
|
36 | 13 | .global _main
|
37 | 14 | _main:
|
| 15 | + mov $0, %eax |
38 | 16 | ret
|
0 commit comments