1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
llvm-mirror/test/tools/gold/X86/thinlto_emit_imports.ll
Teresa Johnson e31605427f [ThinLTO] Add option to emit imports files for distributed backends
Summary:
Add support for emission of plaintext lists of the imported files for
each distributed backend compilation. Used for distributed build file
staging.

Invoked with new gold-plugin thinlto-emit-imports-files option, which is
only valid with thinlto-index-only (i.e. for distributed builds), or
from llvm-lto with new -thinlto-action=emitimports value.

Depends on D19556.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D19636

llvm-svn: 269067
2016-05-10 15:54:09 +00:00

28 lines
894 B
LLVM

; Generate summary sections and test gold handling.
; RUN: opt -module-summary %s -o %t.o
; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
; Ensure gold generates imports files if requested for distributed backends.
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=thinlto \
; RUN: --plugin-opt=thinlto-index-only \
; RUN: --plugin-opt=thinlto-emit-imports-files \
; RUN: -shared %t.o %t2.o -o %t3
; The imports file for this module contains the bitcode file for
; Inputs/thinlto.ll
; RUN: cat %t.o.imports | count 1
; RUN: cat %t.o.imports | FileCheck %s --check-prefix=IMPORTS1
; IMPORTS1: test/tools/gold/X86/Output/thinlto_emit_imports.ll.tmp2.o
; The imports file for Input/thinlto.ll is empty as it does not import anything.
; RUN: cat %t2.o.imports | count 0
declare void @g(...)
define void @f() {
entry:
call void (...) @g()
ret void
}