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