1 #===- common.py - Python LLVM Bindings -----------------------*- python -*--===#
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 #===------------------------------------------------------------------------===#
10 from ctypes import cdll
21 # FIXME should probably have build system define absolute path of shared
22 # library at install time.
23 for lib in ["LLVM-3.1svn", "LLVM"]:
24 result = ctypes.util.find_library(lib)
28 # FIXME This is a local hack to ease development.
29 return "/usr/local/llvm/lib/libLLVM-3.1svn.so"
32 """Obtain a reference to the llvm library."""
35 raise Exception("LLVM shared library not found!")
37 return cdll.LoadLibrary(lib)