Allow initialization of other targets.

- Remove PTX/NVPTX targets from default built and init
This commit is contained in:
Siu Kwan Lam 2013-05-03 10:45:02 -05:00
commit a357987597
6 changed files with 48 additions and 67 deletions

View file

@ -2305,28 +2305,3 @@ if api.llvm.InitializeNativeTargetAsmPrinter():
# should user trigger the initialization?
raise llvm.LLVMException("No native asm printer!?")
#===----------------------------------------------------------------------===
# Initialization
#===----------------------------------------------------------------------===
HAS_PTX = HAS_NVPTX = False
if True: # use PTX?
try:
api.LLVMInitializePTXTarget()
api.LLVMInitializePTXTargetInfo()
api.LLVMInitializePTXTargetMC()
api.LLVMInitializePTXAsmPrinter()
HAS_PTX = True
except AttributeError:
try:
api.LLVMInitializeNVPTXTarget()
api.LLVMInitializeNVPTXTargetInfo()
api.LLVMInitializeNVPTXTargetMC()
api.LLVMInitializeNVPTXAsmPrinter()
HAS_NVPTX = True
except AttributeError:
pass