26 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; split-file %s %t3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o5# RUN: %lld -dylib -lSystem %t/foo.o -o %t/foo.dylib6# RUN: llvm-ar rcs %t/foo.a %t/foo.dylib7# RUN: not %lld %t/test.o %t/foo.a -o /dev/null 2>&1 | FileCheck %s \8# RUN: --check-prefix=SYM -DFILE=%t/foo.a9# 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.a11# 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.a13# SYM: error: [[FILE]]: could not get the member defining symbol _foo: foo.dylib has unhandled file type14# FORCE-LOAD: error: [[FILE]]: -force_load failed to load archive member: foo.dylib has unhandled file type15 16#--- foo.s17.globl _foo18_foo:19 ret20 21#--- test.s22.globl _main23_main:24 callq _foo25 ret26