Add things to make MCJIT working
This commit is contained in:
parent
4c1b9016fb
commit
6d3253e4ea
5 changed files with 7 additions and 2 deletions
|
|
@ -53,6 +53,7 @@ LLVMInterpreter
|
|||
LLVMipa
|
||||
LLVMipo
|
||||
LLVMJIT
|
||||
LLVMMCJIT
|
||||
LLVMLinker
|
||||
LLVMMC
|
||||
LLVMMCParser
|
||||
|
|
@ -71,6 +72,7 @@ LLVMX86Desc
|
|||
LLVMX86Disassembler
|
||||
LLVMX86Info
|
||||
LLVMX86Utils
|
||||
LLVMDebugInfo
|
||||
Advapi32
|
||||
Shell32
|
||||
""".split():
|
||||
|
|
|
|||
|
|
@ -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))()
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -101,3 +101,5 @@ class ExecutionEngine:
|
|||
unwrapped = list(map(capsule.unwrap, args))
|
||||
return self._runFunction(fn, tuple(unwrapped))
|
||||
|
||||
finalizeObject = Method(Void)
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue