diff options
| author | Alexander Shaposhnikov <shal1t712@gmail.com> | 2019-09-23 22:22:55 +0000 |
|---|---|---|
| committer | Alexander Shaposhnikov <shal1t712@gmail.com> | 2019-09-23 22:22:55 +0000 |
| commit | 2eef85e24727999c628adc9b4bf919d67ae10a8f (patch) | |
| tree | e6b025c1b2026e0267e7bc50311abf65182bf6c3 /llvm/test/tools/llvm-lipo | |
| parent | 22fd88530b11af92e1c2658c755d3915538a844d (diff) | |
| download | bcm5719-llvm-2eef85e24727999c628adc9b4bf919d67ae10a8f.tar.gz bcm5719-llvm-2eef85e24727999c628adc9b4bf919d67ae10a8f.zip | |
[llvm-lipo] Add support for archives
Add support for creating universal binaries which
can contain an archive.
Differential revision: https://reviews.llvm.org/D67758
Test plan: make check-all
llvm-svn: 372666
Diffstat (limited to 'llvm/test/tools/llvm-lipo')
| -rw-r--r-- | llvm/test/tools/llvm-lipo/create-archive-input.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-lipo/create-archive-input.test b/llvm/test/tools/llvm-lipo/create-archive-input.test new file mode 100644 index 00000000000..8f4307e9c83 --- /dev/null +++ b/llvm/test/tools/llvm-lipo/create-archive-input.test @@ -0,0 +1,26 @@ +# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o +# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o +# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o + +# RUN: llvm-ar cr %t.empty.a +# RUN: not llvm-lipo %t.empty.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=EMPTY-ARCHIVE %s + +# RUN: llvm-ar cr %t.different_architectures.a %t-i386.o %t-x86_64.o +# RUN: not llvm-lipo %t.different_architectures.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-DIFFERENT-ARCHS %s + +# RUN: llvm-ar cr %t.contains_fat_binary.a %t-universal.o +# RUN: not llvm-lipo %t.contains_fat_binary.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-FAT-BINARY %s + +# RUN: llvm-ar cr %t-i386-lib.a %t-i386.o +# RUN: llvm-lipo %t-i386-lib.a %t-x86_64.o -create -output %t-i386-x86_64-universal.o +# RUN: llvm-lipo %t-i386-x86_64-universal.o -info | FileCheck --check-prefix=INFO-i386-x86_64 %s +# RUN: llvm-lipo %t-i386-x86_64-universal.o -thin i386 -output %t-extracted-i386-lib.a +# RUN: cmp %t-extracted-i386-lib.a %t-i386-lib.a +# RUN: llvm-lipo %t-i386-x86_64-universal.o -thin x86_64 -output %t-extracted-x86_64.o +# RUN: cmp %t-extracted-x86_64.o %t-x86_64.o +# +# EMPTY-ARCHIVE: empty archive +# ARCHIVE-WITH-DIFFERENT-ARCHS: all members must match +# ARCHIVE-WITH-FAT-BINARY: fat file (not allowed in an archive) +# +# INFO-i386-x86_64: i386 x86_64 |

