1; Basic ThinLTO tests. 2; RUN: opt -module-summary %s -o %t.o 3; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o 4 5; First force single-threaded mode 6; RUN: rm -f %t.lto.o %t1.lto.o 7; RUN: ld.lld -save-temps --thinlto-jobs=1 -shared %t.o %t2.o -o %t 8; RUN: llvm-nm %t.lto.o | FileCheck %s --check-prefix=NM1 9; RUN: llvm-nm %t1.lto.o | FileCheck %s --check-prefix=NM2 10 11; Next force multi-threaded mode 12; RUN: rm -f %t2.lto.o %t21.lto.o 13; RUN: ld.lld -save-temps --thinlto-jobs=2 -shared %t.o %t2.o -o %t2 14; RUN: llvm-nm %t2.lto.o | FileCheck %s --check-prefix=NM1 15; RUN: llvm-nm %t21.lto.o | FileCheck %s --check-prefix=NM2 16 17; NM1: T f 18; NM1-NOT: U g 19 20; NM2: T g 21 22; Then check without --thinlto-jobs (which currently default to hardware_concurrency) 23; We just check that we don't crash or fail (as it's not sure which tests are 24; stable on the final output file itself. 25; RUN: ld.lld -shared %t.o %t2.o -o %t2 26 27target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 28target triple = "x86_64-unknown-linux-gnu" 29 30declare void @g(...) 31 32define void @f() { 33entry: 34 call void (...) @g() 35 ret void 36} 37