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