[pypy-svn] r61215 - pypy/trunk/pypy/bin
afa at codespeak.net
afa at codespeak.net
Thu Jan 22 01:57:33 CET 2009
Author: afa
Date: Thu Jan 22 01:57:32 2009
New Revision: 61215
Modified:
pypy/trunk/pypy/bin/py.py
Log:
Add the --cc option to py.py.
I'm not sure it's the best place to put this.
The same option also resides pypy/config/translationoption.py,
with similar effect, except that py.py always executes on the 'host' platform.
Modified: pypy/trunk/pypy/bin/py.py
==============================================================================
--- pypy/trunk/pypy/bin/py.py (original)
+++ pypy/trunk/pypy/bin/py.py Thu Jan 22 01:57:32 2009
@@ -55,11 +55,19 @@
''').interphook('pypy_init')
+def set_compiler(option, opt, value, parser):
+ from pypy.translator.platform import set_platform
+ set_platform('host', value)
+
def main_(argv=None):
starttime = time.time()
config, parser = option.get_standard_options()
interactiveconfig = Config(cmdline_optiondescr)
to_optparse(interactiveconfig, parser=parser)
+ parser.add_option(
+ '--cc', type=str, action="callback",
+ callback=set_compiler,
+ help="Compiler to use for compiling generated C")
args = option.process_options(parser, argv[1:])
if interactiveconfig.verbose:
error.RECORD_INTERPLEVEL_TRACEBACK = True
More information about the Pypy-commit
mailing list