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
12 lines
314 B
LLVM
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
|
|
}
|