[pypy-svn] r69187 - pypy/trunk/pypy/translator

antocuni at codespeak.net antocuni at codespeak.net
Wed Nov 11 18:05:05 CET 2009


Author: antocuni
Date: Wed Nov 11 18:05:04 2009
New Revision: 69187

Modified:
   pypy/trunk/pypy/translator/driver.py
Log:
automatically use the workaround if the mono version is known to be buggy


Modified: pypy/trunk/pypy/translator/driver.py
==============================================================================
--- pypy/trunk/pypy/translator/driver.py	(original)
+++ pypy/trunk/pypy/translator/driver.py	Wed Nov 11 18:05:04 2009
@@ -606,7 +606,18 @@
 then
     EXE=$0
 fi
-if  uname -s | grep -iq Cygwin ; then MONO=; else MONO=mono; fi
+if  uname -s | grep -iq Cygwin
+then 
+    MONO=
+else 
+    MONO=mono
+    # workaround for known mono buggy versions
+    VER=`mono -V | head -1 | sed s/'Mono JIT compiler version \(.*\) (.*'/'\1/'`
+    if [[ 2.1 < "$VER" && "$VER" < 2.4.3 ]]
+    then
+        MONO="mono -O=-branch"
+    fi
+fi
 $LEDIT $MONO "$(dirname $EXE)/$(basename $EXE)-data/%s" "$@" # XXX doesn't work if it's placed in PATH
 """ % main_exe_name)
         f.close()



More information about the Pypy-commit mailing list