[pypy-svn] r15799 - pypy/dist/pypy/translator/goal
ericvrp at codespeak.net
ericvrp at codespeak.net
Tue Aug 9 10:00:19 CEST 2005
Author: ericvrp
Date: Tue Aug 9 10:00:18 2005
New Revision: 15799
Modified:
pypy/dist/pypy/translator/goal/translate_pypy.py
Log:
- Added "-llvm" option. Whenever the C backend is called (generating module, generator standalone)
this option should call the llvm backend instead.
Modified: pypy/dist/pypy/translator/goal/translate_pypy.py
==============================================================================
--- pypy/dist/pypy/translator/goal/translate_pypy.py (original)
+++ pypy/dist/pypy/translator/goal/translate_pypy.py Tue Aug 9 10:00:18 2005
@@ -18,6 +18,7 @@
-no-o Don't do backend-oriented optimizations
-no-c Don't generate the C code
-fork (UNIX) Create a restartable checkpoint after annotation
+ -llvm Use LLVM instead of C
-c Generate the C code, but don't compile it
-o Generate and compile the C code, but don't run it
-tcc Equivalent to the envvar PYPY_CC='tcc -shared -o "%s.so" "%s.c"'
@@ -289,6 +290,7 @@
'-no-c': False,
'-c': False,
'-o': False,
+ '-llvm': False,
'-no-mark-some-objects': False,
'-no-a': False,
'-no-t': False,
@@ -595,14 +597,23 @@
elif options['-no-c']:
print 'Not generating C code.'
elif options['-c']:
- print 'Generating C code without compiling it...'
- filename = t.ccompile(really_compile=False,
- standalone=standalone)
+ if option['-llvm']:
+ print 'Generating LLVM code without compiling it...'
+ filename = t.llvmcompile(really_compile=False,
+ standalone=standalone)
+ else:
+ print 'Generating C code without compiling it...'
+ filename = t.ccompile(really_compile=False,
+ standalone=standalone)
update_usession_dir()
print 'Written %s.' % (filename,)
else:
- print 'Generating and compiling C code...'
- c_entry_point = t.ccompile(standalone=standalone)
+ if options['-llvm']:
+ print 'Generating and compiling LLVM code...'
+ c_entry_point = t.llvmcompile(standalone=standalone)
+ else:
+ print 'Generating and compiling C code...'
+ c_entry_point = t.ccompile(standalone=standalone)
update_usession_dir()
if not options['-o']:
print 'Running!'
More information about the Pypy-commit
mailing list