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