Files
clang-p2996/llvm/test/ExecutionEngine/OrcLazy/static-library-support.ll
Lang Hames 52a34a78d9 [ORC] Refactor definition-generation, add a generator for static libraries.
This patch replaces the JITDylib::DefinitionGenerator typedef with a class of
the same name, and adds support for attaching a sequence of DefinitionGeneration
objects to a JITDylib.

This patch also adds a new definition generator,
StaticLibraryDefinitionGenerator, that can be used to add symbols fom a static
library to a JITDylib. An object from the static library will be added (via
a supplied ObjectLayer reference) whenever a symbol from that object is
referenced.

To enable testing, lli is updated to add support for the --extra-archive option
when running in -jit-kind=orc-lazy mode.

llvm-svn: 368707
2019-08-13 16:05:18 +00:00

12 lines
314 B
LLVM

; This first line will generate the .o files for the next run line
; RUN: llc -filetype=obj -o %t.o %p/Inputs/basic-object-source.ll
; RUN: llvm-ar r %t.a %t.o
; RUN: lli -jit-kind=orc-lazy -extra-archive %t.a %s
declare i32 @foo()
define i32 @main() {
%r = call i32 @foo( ) ; <i32> [#uses=1]
ret i32 %r
}