Add things to make MCJIT working

This commit is contained in:
Siu Kwan Lam 2013-07-31 15:44:01 -05:00
commit 6d3253e4ea
5 changed files with 7 additions and 2 deletions

View file

@ -53,6 +53,7 @@ LLVMInterpreter
LLVMipa
LLVMipo
LLVMJIT
LLVMMCJIT
LLVMLinker
LLVMMC
LLVMMCParser
@ -71,6 +72,7 @@ LLVMX86Desc
LLVMX86Disassembler
LLVMX86Info
LLVMX86Utils
LLVMDebugInfo
Advapi32
Shell32
""".split():

View file

@ -232,7 +232,7 @@ def initialize_target(target, noraise=False):
It is safe to initialize the same target multiple times.
"""
prefix = 'LLVMInitialize'
postfixes = ['Target', 'TargetInfo', 'TargetMC', 'AsmPrinter']
postfixes = ['Target', 'TargetInfo', 'TargetMC', 'AsmPrinter', 'AsmParser']
try:
for postfix in postfixes:
getattr(api, '%s%s%s' % (prefix, target, postfix))()

View file

@ -30,6 +30,7 @@
#include <llvm/PassRegistry.h>
#include <llvm/Support/Host.h>
#include <llvm/ExecutionEngine/MCJIT.h> // to make MCJIT working
#include "auto_pyobject.h"

View file

@ -101,3 +101,5 @@ class ExecutionEngine:
unwrapped = list(map(capsule.unwrap, args))
return self._runFunction(fn, tuple(unwrapped))
finalizeObject = Method(Void)

View file

@ -124,7 +124,7 @@ else:
extra_components = list(extra_components & enabled_components)
libs_core, objs_core = get_libs_and_objs(
['core', 'analysis', 'scalaropts', 'executionengine',
['core', 'analysis', 'scalaropts', 'executionengine', 'mcjit',
'jit', 'native', 'interpreter', 'bitreader', 'bitwriter',
'instrumentation', 'ipa', 'ipo', 'transformutils',
'asmparser', 'linker', 'support', 'vectorize']