Patch for OpenBSD, x86_64 support (Laurence Tratt)

Added JIT tutorial ports (Sebastien Binet)
Updated documentation

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@23 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2008-07-05 06:33:51 +00:00
commit df4365921d
20 changed files with 501 additions and 74 deletions

View file

@ -26,11 +26,14 @@ def get_llvm_config():
# get from command-line, or use default
lc = 'llvm-config'
for i in xrange(0, len(sys.argv)):
i = 0
while i < len(sys.argv):
arg = sys.argv[i]
if arg.startswith('--llvm-config='):
del sys.argv[i]
lc = arg.split('=')[1]
else:
i += 1
# see if it works
version = _run(lc + ' --version')
@ -49,7 +52,9 @@ def call_setup(llvm_config):
['core', 'analysis', 'scalaropts', 'executionengine',
'jit', 'native'])
std_libs = [ 'pthread', 'dl', 'm' ]
std_libs = [ 'pthread', 'm' ]
if not sys.platform.startswith("openbsd"):
std_libs.append("dl")
ext_core = Extension(
'llvm._core',
@ -60,11 +65,12 @@ def call_setup(llvm_config):
include_dirs = [incdir],
library_dirs = [libdir],
libraries = std_libs + libs_core,
extra_objects = objs_core)
extra_objects = objs_core,
extra_link_args = ["-fPIC"])
setup(
name='llvm-py',
version='0.2.1',
version='0.3',
description='Python Bindings for LLVM',
author='Mahadevan R',
author_email='mdevan.foobar@gmail.com',