[gn build] Add some llvm/tools: lli, lli-child-target

Also add build files for dependencies llvm/lib/ExecutionEngine/{Interpreter,Orc}

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56193

llvm-svn: 350226
This commit is contained in:
Nico Weber 2019-01-02 17:36:41 +00:00
parent d963eea188
commit a3429b3981
5 changed files with 89 additions and 0 deletions

View File

@ -7,6 +7,8 @@ group("default") {
"//lld/test",
"//llvm/tools/bugpoint",
"//llvm/tools/dsymutil",
"//llvm/tools/lli",
"//llvm/tools/lli/ChildTarget:lli-child-target",
"//llvm/tools/llvm-c-test",
"//llvm/tools/llvm-cfi-verify",
"//llvm/tools/llvm-cov",

View File

@ -0,0 +1,15 @@
static_library("Interpreter") {
output_name = "LLVMInterpreter"
deps = [
"//llvm/include/llvm/Config:config",
"//llvm/lib/CodeGen",
"//llvm/lib/ExecutionEngine",
"//llvm/lib/IR",
"//llvm/lib/Support",
]
sources = [
"Execution.cpp",
"ExternalFunctions.cpp",
"Interpreter.cpp",
]
}

View File

@ -0,0 +1,33 @@
static_library("Orc") {
output_name = "LLVMOrcJIT"
deps = [
"//llvm/lib/ExecutionEngine",
"//llvm/lib/ExecutionEngine/RuntimeDyld",
"//llvm/lib/IR",
"//llvm/lib/Object",
"//llvm/lib/Support",
"//llvm/lib/Transforms/Utils",
]
sources = [
"CompileOnDemandLayer.cpp",
"Core.cpp",
"ExecutionUtils.cpp",
"IRCompileLayer.cpp",
"IRTransformLayer.cpp",
"IndirectionUtils.cpp",
"JITTargetMachineBuilder.cpp",
"LLJIT.cpp",
"Layer.cpp",
"LazyReexports.cpp",
"Legacy.cpp",
"NullResolver.cpp",
"ObjectTransformLayer.cpp",
"OrcABISupport.cpp",
"OrcCBindings.cpp",
"OrcError.cpp",
"OrcMCJITReplacement.cpp",
"RPCUtils.cpp",
"RTDyldObjectLinkingLayer.cpp",
"ThreadSafeModule.cpp",
]
}

View File

@ -0,0 +1,29 @@
executable("lli") {
deps = [
"//llvm/include/llvm/Config:llvm-config",
"//llvm/lib/AsmParser",
"//llvm/lib/Bitcode/Reader",
"//llvm/lib/CodeGen",
"//llvm/lib/CodeGen/SelectionDAG",
"//llvm/lib/ExecutionEngine",
"//llvm/lib/ExecutionEngine/Interpreter",
"//llvm/lib/ExecutionEngine/MCJIT",
"//llvm/lib/ExecutionEngine/Orc",
"//llvm/lib/ExecutionEngine/RuntimeDyld",
"//llvm/lib/IR",
"//llvm/lib/IRReader",
"//llvm/lib/MC",
"//llvm/lib/Support",
"//llvm/lib/Target",
"//llvm/lib/Target:NativeTarget",
"//llvm/lib/Transforms/Instrumentation",
"//llvm/lib/Transforms/Utils",
]
sources = [
"lli.cpp",
]
if (host_os == "linux") {
# Corresponds to export_executable_symbols() in cmake.
ldflags = [ "-rdynamic" ]
}
}

View File

@ -0,0 +1,10 @@
executable("lli-child-target") {
deps = [
"//llvm/lib/ExecutionEngine/Orc",
"//llvm/lib/ExecutionEngine/RuntimeDyld",
"//llvm/lib/Support",
]
sources = [
"ChildTarget.cpp",
]
}