brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · bc791e2 Raw
34 lines · plain
1; First generate bitcode with a module summary index for each file2; RUN: opt -module-summary %s -o %t.o3; RUN: opt -module-summary %p/Inputs/thinlto_emit_linked_objects.ll -o %t2.o4 5; Next do the ThinLink step, specifying thinlto-index-only so that the gold6; plugin exits after generating individual indexes. The objects the linker7; decided to include in the link should be emitted into the file specified8; after 'thinlto-index-only='. Note that in this test both files should9; be included in the link, but in a case where there was an object in10; a library that had no strongly referenced symbols, that file would not11; be included in the link and listed in the emitted file. However, this12; requires gold version 1.12.13; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \14; RUN:    --plugin-opt=thinlto \15; RUN:    --plugin-opt=thinlto-index-only=%t3 \16; RUN:    -o %t5 \17; RUN:    %t.o \18; RUN:    --start-lib %t2.o --end-lib19 20; RUN: cat %t3 | FileCheck %s21; CHECK: thinlto_emit_linked_objects.ll.tmp.o22; CHECK: thinlto_emit_linked_objects.ll.tmp2.o23 24target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"25target triple = "x86_64-unknown-linux-gnu"26 27define i32 @main() {28entry:29  call void (...) @foo()30  ret i32 031}32 33declare void @foo(...)34