[pypy-svn] r16499 - pypy/dist/pypy/translator/llvm2
rxe at codespeak.net
rxe at codespeak.net
Thu Aug 25 16:24:18 CEST 2005
Author: rxe
Date: Thu Aug 25 16:24:17 2005
New Revision: 16499
Modified:
pypy/dist/pypy/translator/llvm2/build_llvm_module.py
pypy/dist/pypy/translator/llvm2/genllvm.py
Log:
Make (some) tests run again.
Modified: pypy/dist/pypy/translator/llvm2/build_llvm_module.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/build_llvm_module.py (original)
+++ pypy/dist/pypy/translator/llvm2/build_llvm_module.py Thu Aug 25 16:24:17 2005
@@ -77,9 +77,10 @@
cmds = ["llvm-as %s.ll" % b]
bcfile = dirpath.join("externs", "externs_linked.bc")
- cmds.append("llvm-link %s.bc %s -o %s_all.bc" % (b, str(bcfile), b))
- ball = str(dirpath.join('%s_all.bc' % b))
- cmds.append("opt %s %s -f -o %s.bc" % (OPTIMIZATION_SWITCHES, ball, b))
+ if bcfile.check(file=1):
+ cmds.append("llvm-link %s.bc %s -o %s_all.bc" % (b, str(bcfile), b))
+ ball = str(dirpath.join('%s_all.bc' % b))
+ cmds.append("opt %s %s -f -o %s.bc" % (OPTIMIZATION_SWITCHES, ball, b))
if False and sys.maxint == 2147483647: #32 bit platform
cmds.append("llc %s %s.bc -f -o %s.s" % (EXCEPTIONS_SWITCHES, b, b))
Modified: pypy/dist/pypy/translator/llvm2/genllvm.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/genllvm.py (original)
+++ pypy/dist/pypy/translator/llvm2/genllvm.py Thu Aug 25 16:24:17 2005
@@ -182,8 +182,10 @@
math_fns += 'sin sinh sqrt tan tanh frexp modf pow hypot ldexp is_error'
#XXX
fns2 = [x[1:] for x in extfuncnode.ExternalFuncNode.used_external_functions.keys()]
- fns = ["ll_math_is_error"]
- fns += [('ll_math_%s' % f) for f in math_fns.split() if f in fns2]
+
+ fns = [('ll_math_%s' % f) for f in math_fns.split() if f in fns2]
+ if fns:
+ fns.append("ll_math_is_error")
return get_ll(open(p).read(), extern_dir, fns)
More information about the Pypy-commit
mailing list