Skip to content

Commit

Permalink
Make the build script compatible with Linux and OS X as well
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Oct 23, 2014
1 parent 09774d0 commit 803d8d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
File renamed without changes.
12 changes: 11 additions & 1 deletion ffi/build.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env python
"""
Build script for the shared library providing the C ABI bridge to LLVM.
"""

import os
import subprocess
Expand All @@ -11,7 +15,7 @@

def main_win32():
# NOTE: the LLVM build must have the same bitness as the Python runtime.
# I don't know if there's an way for us to check this.
# I don't know if there's an easy way for us to check this.
config = 'Release'
if not os.path.isdir(build_dir):
os.mkdir(build_dir)
Expand All @@ -21,6 +25,12 @@ def main_win32():
shutil.copy(os.path.join(build_dir, config, 'llvmlite.dll'), here_dir)


def main_posix(kind):
os.chdir(here_dir)
makefile = "Makefile.%s" % (kind,)
subprocess.check_call(['make', '-f', makefile])


def main():
if sys.platform == 'win32':
main_win32()
Expand Down

0 comments on commit 803d8d8

Please sign in to comment.