1; REQUIRES: x86 2; Basic ThinLTO tests. 3; RUN: opt -module-summary %s -o %t.o 4; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o 5 6; First force single-threaded mode 7; RUN: rm -f %t.lto.o %t1.lto.o 8; RUN: ld.lld -save-temps --thinlto-jobs=1 -shared %t.o %t2.o -o %t 9; RUN: llvm-nm %t1.lto.o | FileCheck %s --check-prefix=NM1 10; RUN: llvm-nm %t2.lto.o | FileCheck %s --check-prefix=NM2 11 12; Next force multi-threaded mode 13; RUN: rm -f %t2.lto.o %t21.lto.o 14; RUN: ld.lld -save-temps --thinlto-jobs=2 -shared %t.o %t2.o -o %t2 15; RUN: llvm-nm %t21.lto.o | FileCheck %s --check-prefix=NM1 16; RUN: llvm-nm %t22.lto.o | FileCheck %s --check-prefix=NM2 17 18; NM1: T f 19; NM1-NOT: U g 20 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