1; REQUIRES: x86 2; RUN: split-file %s %t 3; RUN: llvm-as %t/foo.ll -o %t/foo.o 4; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o 5; RUN: rm -f %t/foo.a 6; RUN: llvm-ar rcs %t/foo.a %t/foo.o 7; RUN: %lld -save-temps -lSystem %t/test.o %t/foo.a -o %t/test 8; RUN: llvm-objdump -d --macho --no-show-raw-insn %t/test | FileCheck %s 9 10; CHECK: _main: 11; CHECK-NEXT: callq _foo 12; CHECK-NEXT: retq 13 14;--- foo.ll 15 16target triple = "x86_64-apple-macosx10.15.0" 17target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 18 19define void @foo() { 20 ret void 21} 22 23;--- test.s 24 25.globl _main 26_main: 27 callq _foo 28 ret 29