1# REQUIRES: x86 2# RUN: rm -rf %t; split-file %s %t 3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o 5# RUN: %lld -dylib -lSystem %t/foo.o -o %t/foo.dylib 6# RUN: llvm-ar rcs %t/foo.a %t/foo.dylib 7# RUN: not %lld %t/test.o %t/foo.a -o /dev/null 2>&1 | FileCheck %s \ 8# RUN: --check-prefix=SYM -DFILE=%t/foo.a 9# RUN: not %lld %t/test.o -ObjC %t/foo.a -o /dev/null 2>&1 | FileCheck %s \ 10# RUN: --check-prefix=SYM -DFILE=%t/foo.a 11# RUN: not %lld %t/test.o -force_load %t/foo.a -o /dev/null 2>&1 | FileCheck %s \ 12# RUN: --check-prefix=FORCE-LOAD -DFILE=%t/foo.a 13# SYM: error: [[FILE]]: could not get the member defining symbol _foo: foo.dylib has unhandled file type 14# FORCE-LOAD: error: [[FILE]]: -force_load failed to load archive member: foo.dylib has unhandled file type 15 16#--- foo.s 17.globl _foo 18_foo: 19 ret 20 21#--- test.s 22.globl _main 23_main: 24 callq _foo 25 ret 26