Index: llvm/trunk/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/BUILD.gn +++ llvm/trunk/utils/gn/secondary/BUILD.gn @@ -7,6 +7,8 @@ "//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", Index: llvm/trunk/utils/gn/secondary/llvm/lib/ExecutionEngine/Interpreter/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/llvm/lib/ExecutionEngine/Interpreter/BUILD.gn +++ llvm/trunk/utils/gn/secondary/llvm/lib/ExecutionEngine/Interpreter/BUILD.gn @@ -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", + ] +} Index: llvm/trunk/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn +++ llvm/trunk/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn @@ -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", + ] +} Index: llvm/trunk/utils/gn/secondary/llvm/tools/lli/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/llvm/tools/lli/BUILD.gn +++ llvm/trunk/utils/gn/secondary/llvm/tools/lli/BUILD.gn @@ -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" ] + } +} Index: llvm/trunk/utils/gn/secondary/llvm/tools/lli/ChildTarget/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/llvm/tools/lli/ChildTarget/BUILD.gn +++ llvm/trunk/utils/gn/secondary/llvm/tools/lli/ChildTarget/BUILD.gn @@ -0,0 +1,10 @@ +executable("lli-child-target") { + deps = [ + "//llvm/lib/ExecutionEngine/Orc", + "//llvm/lib/ExecutionEngine/RuntimeDyld", + "//llvm/lib/Support", + ] + sources = [ + "ChildTarget.cpp", + ] +}