1; REQUIRES: x86_64-apple, x86-registered-target, arm-registered-target 2; 3; RUN: rm -rf %t && mkdir -p %t 4; RUN: llc -filetype=obj -mtriple=x86_64-apple-macosx -o %t/foo.x86_64.o \ 5; RUN: %p/Inputs/foo-return-i32-0.ll 6; RUN: llvm-ar r %t/foo.x86_64.a %t/foo.x86_64.o 7; RUN: llc -filetype=obj -mtriple=arm-apple-ios -o %t/foo.arm.o \ 8; RUN: %p/Inputs/foo-return-i32-0.ll 9; RUN: llvm-ar r %t/foo.arm.a %t/foo.arm.o 10; RUN: llvm-lipo -create %t/foo.x86_64.a %t/foo.arm.a -output %t/foo.a 11; RUN: lli -jit-kind=orc-lazy -extra-archive %t/foo.a %s 12; 13; Check that MachO universal binaries containing archives work. 14; This test compiles two copies of a simple int foo() function that returns 15; zero, one copy for x86_64 and one for arm. It then puts each of these in an 16; archive and combines these two archives into a macho universal binary. 17; Finally we execute a main function that references foo to ensure that the 18; x86-64 copy is correctly found and linked. 19 20declare i32 @foo() 21 22define i32 @main(i32 %argc, i8** nocapture readnone %argv) { 23entry: 24 %0 = call i32 @foo() 25 ret i32 %0 26} 27