More small Windows build fixes. Also switch to LLVM 3.0 libs

This commit is contained in:
Matt Pharr
2011-09-26 16:07:23 -07:00
parent e6f80c0adc
commit cf73286938
3 changed files with 24 additions and 16 deletions

View File

@@ -4,6 +4,8 @@ import sys
import string
import re
import subprocess
import platform
import os
length=0
@@ -14,8 +16,12 @@ target = re.sub("\.ll$", "", target)
target = re.sub("\.c$", "", target)
target = re.sub("-", "_", target)
llvm_as="llvm-as"
if platform.system() == 'Windows' or string.find(platform.system(), "CYGWIN_NT") != -1:
llvm_as = os.getenv("LLVM_INSTALL_DIR").replace("\\", "/") + "/bin/" + llvm_as
try:
as_out=subprocess.Popen([ "llvm-as", "-", "-o", "-"], stdout=subprocess.PIPE)
as_out=subprocess.Popen([llvm_as, "-", "-o", "-"], stdout=subprocess.PIPE)
except IOError:
print >> sys.stderr, "Couldn't open " + src
sys.exit(1)