1; REQUIRES: x86 2; Tests that we accept an archive file without symbol table 3; if all the member files are bitcode files. 4 5; RUN: llvm-as -o %t1.o %s 6; RUN: llvm-as -o %t2.o %S/Inputs/archive.ll 7 8; RUN: rm -f %t1.a %t2.a 9; RUN: llvm-ar crS %t1.a %t2.o 10; RUN: llvm-ar crs %t2.a %t2.o 11 12; RUN: ld.lld -o %t -emain %t1.o %t1.a 13; RUN: ld.lld -o %t -emain %t1.o %t2.a 14 15target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 16target triple = "x86_64-unknown-linux-gnu" 17 18declare void @f() 19 20define i32 @main() { 21 call void @f() 22 ret i32 0 23} 24 25; RUN: echo 'f:' | llvm-mc -triple=x86_64-pc-linux -filetype=obj - -o %t3.o 26; RUN: rm -f %t3.a 27; RUN: llvm-ar crS %t3.a %t3.o 28; RUN: not ld.lld -o /dev/null -emain %t1.o %t3.a 2>&1 | FileCheck -check-prefix=ERR1 %s 29; ERR1: error: {{.*}}.a: archive has no index; run ranlib to add one 30 31; RUN: rm -f %t4.a 32; RUN: llvm-ar cr %t4.a 33; RUN: not ld.lld -o /dev/null -emain %t1.o %t4.a 2>&1 | FileCheck -check-prefix=ERR2 %s 34; ERR2: error: undefined symbol: f 35