Fangrui Song | 55c81d4 | 2020-01-21 17:02:25 -0800 | [diff] [blame] | 1 | # RUN: yaml2obj %s -o %t |
Shoaib Meenai | 6442317 | 2019-06-21 21:59:01 +0000 | [diff] [blame] | 2 | |
Shoaib Meenai | 995798d | 2019-07-04 00:17:02 +0000 | [diff] [blame] | 3 | # RUN: not llvm-lipo %t -thin arm64_32 -output %t.out 2>&1 | FileCheck --check-prefix=ARCH_NOT_IN_FILE %s |
| 4 | # ARCH_NOT_IN_FILE: does not contain the specified architecture arm64_32 to thin it to |
Shoaib Meenai | 6442317 | 2019-06-21 21:59:01 +0000 | [diff] [blame] | 5 | |
| 6 | # RUN: not llvm-lipo %t -thin aarch101 -output %t.out 2>&1 | FileCheck --check-prefix=INVALID_ARCH %s |
| 7 | # INVALID_ARCH: Invalid architecture: aarch101 |
| 8 | |
Fangrui Song | 55c81d4 | 2020-01-21 17:02:25 -0800 | [diff] [blame] | 9 | # RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o |
Shoaib Meenai | 6442317 | 2019-06-21 21:59:01 +0000 | [diff] [blame] | 10 | # RUN: llvm-lipo %t-universal.o -thin i386 -output %t32.o |
Fangrui Song | 55c81d4 | 2020-01-21 17:02:25 -0800 | [diff] [blame] | 11 | # RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-basic32.o |
Shoaib Meenai | 6442317 | 2019-06-21 21:59:01 +0000 | [diff] [blame] | 12 | # RUN: cmp %t32.o %t-basic32.o |
| 13 | |
| 14 | --- !fat-mach-o |
| 15 | FatHeader: |
| 16 | magic: 0xCAFEBABE |
| 17 | nfat_arch: 2 |
| 18 | FatArchs: |
| 19 | - cputype: 0x00000007 |
| 20 | cpusubtype: 0x00000003 |
| 21 | offset: 0x0000000000001000 |
| 22 | size: 28 |
| 23 | align: 12 |
| 24 | - cputype: 0x01000007 |
| 25 | cpusubtype: 0x00000003 |
| 26 | offset: 0x0000000000002000 |
| 27 | size: 32 |
| 28 | align: 12 |
| 29 | Slices: |
| 30 | - !mach-o |
| 31 | FileHeader: |
| 32 | magic: 0xFEEDFACE |
| 33 | cputype: 0x00000007 |
| 34 | cpusubtype: 0x00000003 |
| 35 | filetype: 0x00000001 |
| 36 | ncmds: 0 |
| 37 | sizeofcmds: 0 |
| 38 | flags: 0x00002000 |
| 39 | - !mach-o |
| 40 | FileHeader: |
| 41 | magic: 0xFEEDFACF |
| 42 | cputype: 0x01000007 |
| 43 | cpusubtype: 0x00000003 |
| 44 | filetype: 0x00000001 |
| 45 | ncmds: 0 |
| 46 | sizeofcmds: 0 |
| 47 | flags: 0x00002000 |
| 48 | reserved: 0x00000000 |
| 49 | ... |