From 2cce3f91f89e9ca353412db6c9e2b90b02d563fb Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Mon, 5 Nov 2012 19:06:05 +0000 Subject: [PATCH] lli: Initialize the native asm parser for inline assembly. MCJIT supports inline assembly, but requires the asm parser to do so. Make sure to link it in and initialize it. llvm-svn: 167392 --- llvm/tools/lli/CMakeLists.txt | 2 +- llvm/tools/lli/LLVMBuild.txt | 2 +- llvm/tools/lli/Makefile | 2 +- llvm/tools/lli/lli.cpp | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/llvm/tools/lli/CMakeLists.txt b/llvm/tools/lli/CMakeLists.txt index a9c7adf..ed479f5 100644 --- a/llvm/tools/lli/CMakeLists.txt +++ b/llvm/tools/lli/CMakeLists.txt @@ -1,5 +1,5 @@ -set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag) +set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag native) if( LLVM_USE_OPROFILE ) set(LLVM_LINK_COMPONENTS diff --git a/llvm/tools/lli/LLVMBuild.txt b/llvm/tools/lli/LLVMBuild.txt index 4eb82bd..36ceb39 100644 --- a/llvm/tools/lli/LLVMBuild.txt +++ b/llvm/tools/lli/LLVMBuild.txt @@ -19,4 +19,4 @@ type = Tool name = lli parent = Tools -required_libraries = AsmParser BitReader Interpreter JIT MCJIT NativeCodeGen SelectionDAG +required_libraries = AsmParser BitReader Interpreter JIT MCJIT NativeCodeGen SelectionDAG Native diff --git a/llvm/tools/lli/Makefile b/llvm/tools/lli/Makefile index 100fc2e..31f3ab8 100644 --- a/llvm/tools/lli/Makefile +++ b/llvm/tools/lli/Makefile @@ -12,7 +12,7 @@ TOOLNAME := lli include $(LEVEL)/Makefile.config -LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag +LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag native # If Intel JIT Events support is confiured, link against the LLVM Intel JIT # Events interface library diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index 22b48cf..9a27a4c 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -508,6 +508,7 @@ int main(int argc, char **argv, char * const *envp) { // usable by the JIT. InitializeNativeTarget(); InitializeNativeTargetAsmPrinter(); + InitializeNativeTargetAsmParser(); cl::ParseCommandLineOptions(argc, argv, "llvm interpreter & dynamic compiler\n"); -- 2.7.4