[pypy-svn] pypy default: A hack to force users to specify -O2 or -Ojit in

arigo commits-noreply at bitbucket.org
Sat Apr 30 11:53:14 CEST 2011

Author: Armin Rigo <arigo at tunes.org>
Changeset: r43788:a429ba536944
Date: 2011-04-30 11:52 +0200

Log:	A hack to force users to specify -O2 or -Ojit in "translate.py

diff --git a/pypy/translator/goal/targetpypystandalone.py b/pypy/translator/goal/targetpypystandalone.py
--- a/pypy/translator/goal/targetpypystandalone.py
+++ b/pypy/translator/goal/targetpypystandalone.py
@@ -105,6 +105,9 @@
         return parser
     def handle_config(self, config, translateconfig):
+        if translateconfig._cfgimpl_value_owners['opt'] == 'default':
+            raise Exception("You have to specify the --opt level.\n"
+                    "Try --opt=2 or --opt=jit, or equivalently -O2 or -Ojit .")
         self.translateconfig = translateconfig
         # set up the objspace optimizations based on the --opt argument
         from pypy.config.pypyoption import set_pypy_opt_level

More information about the Pypy-commit mailing list