
.. contents::


.. _objspace:
.. _`overview-of-command-line-options-for-objspace`:

-------------------------------
PyPy Python interpreter options
-------------------------------

The following options can be used after ``rpython
targetpypystandalone`` or as options to ``py.py``.

* `--allworkingmodules:`_ use as many working modules as possible

* `--ext:`_ Comma-separated list of third-party builtin modules

* `--hash:`_ The hash function to use for strings\: fnv from CPython 2.7 or
  siphash24 from CPython >= 3.4

* `--magic_tag:`_ Tag to differentiate .pyc files for different Python
  interpreters

* `--objspace-disable_call_speedhacks:`_ make sure that all calls go through
  space.call\_args

* `--objspace-disable_entrypoints:`_ Disable external entry points, notably the
  cpyext module and cffi's embedding mode.

* `--objspace-honor__builtins__:`_ Honor the \_\_builtins\_\_ key of a module
  dictionary

* `--objspace-lonepycfiles:`_ Import pyc files with no matching py file

* `--objspace-std-intshortcut:`_ special case addition and subtraction of two
  integers in BINARY\_ADD//BINARY\_SUBTRACT and their inplace counterparts

* `--objspace-std-methodcachesizeexp:`_ 2 \*\* methodcachesizeexp is the size
  of the of the method cache

* `--objspace-std-newshortcut:`_ cache and shortcut calling \_\_new\_\_ from
  builtin types

* `--objspace-std-optimized_list_getitem:`_ special case the 'list[integer]'
  expressions

* `--objspace-std-withliststrategies:`_ enable optimized ways to store lists of
  primitives

* `--objspace-std-withmethodcachecounter:`_ try to cache methods and provide a
  counter in \_\_pypy\_\_. for testing purposes only.

* `--objspace-std-withprebuiltint:`_ prebuild commonly used int objects

* `--objspace-std-withsmalllong:`_ use a version of 'long' in a C long long

* `--objspace-std-withspecialisedtuple:`_ use specialised tuples

* `--objspace-std-withtproxy:`_ support transparent proxies

* `--prebuiltintfrom:`_ lowest integer which is prebuilt

* `--prebuiltintto:`_ highest integer which is prebuilt

* `--soabi:`_ Tag to differentiate extension modules built for different Python
  interpreters

* `--translationmodules:`_ use only those modules that are needed to run
  translate.py on pypy

* `--withmod-__builtin__:`_ use module \_\_builtin\_\_

* `--withmod-__pypy__:`_ use module \_\_pypy\_\_

* `--withmod-_ast:`_ use module \_ast

* `--withmod-_cffi_backend:`_ use module \_cffi\_backend

* `--withmod-_codecs:`_ use module \_codecs

* `--withmod-_collections:`_ use module \_collections

* `--withmod-_continuation:`_ use module \_continuation

* `--withmod-_cppyy:`_ use module \_cppyy

* `--withmod-_csv:`_ use module \_csv

* `--withmod-_demo:`_ use module \_demo

* `--withmod-_hashlib:`_ use module \_hashlib

* `--withmod-_io:`_ use module \_io

* `--withmod-_jitlog:`_ use module \_jitlog

* `--withmod-_locale:`_ use module \_locale

* `--withmod-_lsprof:`_ use module \_lsprof

* `--withmod-_md5:`_ use module \_md5

* `--withmod-_minimal_curses:`_ use module \_minimal\_curses

* `--withmod-_multibytecodec:`_ use module \_multibytecodec

* `--withmod-_multiprocessing:`_ use module \_multiprocessing

* `--withmod-_pypyjson:`_ use module \_pypyjson

* `--withmod-_random:`_ use module \_random

* `--withmod-_rawffi:`_ use module \_rawffi

* `--withmod-_sha:`_ use module \_sha

* `--withmod-_socket:`_ use module \_socket

* `--withmod-_sre:`_ use module \_sre

* `--withmod-_ssl:`_ use module \_ssl

* `--withmod-_testing:`_ use module \_testing

* `--withmod-_vmprof:`_ use module \_vmprof

* `--withmod-_warnings:`_ use module \_warnings

* `--withmod-_weakref:`_ use module \_weakref

* `--withmod-_winreg:`_ use module \_winreg

* `--withmod-array:`_ use module array

* `--withmod-binascii:`_ use module binascii

* `--withmod-bz2:`_ use module bz2

* `--withmod-cStringIO:`_ use module cStringIO

* `--withmod-cmath:`_ use module cmath

* `--withmod-cpyext:`_ use module cpyext

* `--withmod-crypt:`_ use module crypt

* `--withmod-errno:`_ use module errno

* `--withmod-exceptions:`_ use module exceptions

* `--withmod-faulthandler:`_ use module faulthandler

* `--withmod-fcntl:`_ use module fcntl

* `--withmod-gc:`_ use module gc

* `--withmod-imp:`_ use module imp

* `--withmod-itertools:`_ use module itertools

* `--withmod-marshal:`_ use module marshal

* `--withmod-math:`_ use module math

* `--withmod-micronumpy:`_ use module micronumpy

* `--withmod-mmap:`_ use module mmap

* `--withmod-operator:`_ use module operator

* `--withmod-parser:`_ use module parser

* `--withmod-posix:`_ use module posix

* `--withmod-pwd:`_ use module pwd

* `--withmod-pyexpat:`_ use module pyexpat

* `--withmod-pypyjit:`_ use module pypyjit

* `--withmod-select:`_ use module select

* `--withmod-signal:`_ use module signal

* `--withmod-struct:`_ use module struct

* `--withmod-symbol:`_ use module symbol

* `--withmod-sys:`_ use module sys

* `--withmod-termios:`_ use module termios

* `--withmod-thread:`_ use module thread

* `--withmod-time:`_ use module time

* `--withmod-token:`_ use module token

* `--withmod-unicodedata:`_ use module unicodedata

* `--withmod-zipimport:`_ use module zipimport

* `--withmod-zlib:`_ use module zlib

Internal Options
================

* `--withmod-_file:`_ use module \_file
* `--withmod-_pickle_support:`_ use module \_pickle\_support

.. _--objspace-disable\_call\_speedhacks\:: objspace.disable_call_speedhacks.html
.. _--objspace-honor\_\_builtins\_\_\:: objspace.honor__builtins__.html
.. _--ext\:: objspace.extmodules.html
.. _--withmod-pypyjit\:: objspace.usemodules.pypyjit.html
.. _--withmod-imp\:: objspace.usemodules.imp.html
.. _--withmod-\_collections\:: objspace.usemodules._collections.html
.. _--withmod-\_codecs\:: objspace.usemodules._codecs.html
.. _--withmod-binascii\:: objspace.usemodules.binascii.html
.. _--withmod-\_csv\:: objspace.usemodules._csv.html
.. _--withmod-\_demo\:: objspace.usemodules._demo.html
.. _--objspace-std-withsmalllong\:: objspace.std.withsmalllong.html
.. _--withmod-sys\:: objspace.usemodules.sys.html
.. _--withmod-\_pickle\_support\:: objspace.usemodules._pickle_support.html
.. _--withmod-parser\:: objspace.usemodules.parser.html
.. _--withmod-\_socket\:: objspace.usemodules._socket.html
.. _--withmod-fcntl\:: objspace.usemodules.fcntl.html
.. _--prebuiltintfrom\:: objspace.std.prebuiltintfrom.html
.. _--withmod-micronumpy\:: objspace.usemodules.micronumpy.html
.. _--withmod-\_\_builtin\_\_\:: objspace.usemodules.__builtin__.html
.. _--objspace-std-withmethodcachecounter\:: objspace.std.withmethodcachecounter.html
.. _--withmod-\_lsprof\:: objspace.usemodules._lsprof.html
.. _--withmod-\_cppyy\:: objspace.usemodules._cppyy.html
.. _--withmod-\_ssl\:: objspace.usemodules._ssl.html
.. _--withmod-\_cffi\_backend\:: objspace.usemodules._cffi_backend.html
.. _--withmod-\_winreg\:: objspace.usemodules._winreg.html
.. _--withmod-\_pypyjson\:: objspace.usemodules._pypyjson.html
.. _--withmod-\_rawffi\:: objspace.usemodules._rawffi.html
.. _--withmod-signal\:: objspace.usemodules.signal.html
.. _--withmod-zipimport\:: objspace.usemodules.zipimport.html
.. _--withmod-time\:: objspace.usemodules.time.html
.. _--withmod-struct\:: objspace.usemodules.struct.html
.. _--withmod-cpyext\:: objspace.usemodules.cpyext.html
.. _--objspace-std-withprebuiltint\:: objspace.std.withprebuiltint.html
.. _--withmod-\_jitlog\:: objspace.usemodules._jitlog.html
.. _--withmod-\_locale\:: objspace.usemodules._locale.html
.. _--withmod-pwd\:: objspace.usemodules.pwd.html
.. _--objspace-std-methodcachesizeexp\:: objspace.std.methodcachesizeexp.html
.. _--withmod-\_multiprocessing\:: objspace.usemodules._multiprocessing.html
.. _--withmod-posix\:: objspace.usemodules.posix.html
.. _--withmod-mmap\:: objspace.usemodules.mmap.html
.. _--withmod-itertools\:: objspace.usemodules.itertools.html
.. _--objspace-disable\_entrypoints\:: objspace.disable_entrypoints.html
.. _--hash\:: objspace.hash.html
.. _--withmod-faulthandler\:: objspace.usemodules.faulthandler.html
.. _--withmod-\_ast\:: objspace.usemodules._ast.html
.. _--objspace-std-intshortcut\:: objspace.std.intshortcut.html
.. _--withmod-unicodedata\:: objspace.usemodules.unicodedata.html
.. _--withmod-\_\_pypy\_\_\:: objspace.usemodules.__pypy__.html
.. _--withmod-\_multibytecodec\:: objspace.usemodules._multibytecodec.html
.. _--withmod-\_testing\:: objspace.usemodules._testing.html
.. _--withmod-termios\:: objspace.usemodules.termios.html
.. _--withmod-crypt\:: objspace.usemodules.crypt.html
.. _--withmod-\_file\:: objspace.usemodules._file.html
.. _--magic\_tag\:: objspace.magic_tag.html
.. _--translationmodules\:: objspace.translationmodules.html
.. _--withmod-\_vmprof\:: objspace.usemodules._vmprof.html
.. _--withmod-array\:: objspace.usemodules.array.html
.. _--withmod-\_weakref\:: objspace.usemodules._weakref.html
.. _--withmod-select\:: objspace.usemodules.select.html
.. _--withmod-pyexpat\:: objspace.usemodules.pyexpat.html
.. _--withmod-math\:: objspace.usemodules.math.html
.. _--objspace-std-withspecialisedtuple\:: objspace.std.withspecialisedtuple.html
.. _--objspace-std-optimized\_list\_getitem\:: objspace.std.optimized_list_getitem.html
.. _--withmod-cStringIO\:: objspace.usemodules.cStringIO.html
.. _--withmod-marshal\:: objspace.usemodules.marshal.html
.. _--withmod-thread\:: objspace.usemodules.thread.html
.. _--allworkingmodules\:: objspace.allworkingmodules.html
.. _--prebuiltintto\:: objspace.std.prebuiltintto.html
.. _--withmod-token\:: objspace.usemodules.token.html
.. _--withmod-bz2\:: objspace.usemodules.bz2.html
.. _--withmod-cmath\:: objspace.usemodules.cmath.html
.. _--objspace-std-withliststrategies\:: objspace.std.withliststrategies.html
.. _--withmod-\_random\:: objspace.usemodules._random.html
.. _--withmod-\_continuation\:: objspace.usemodules._continuation.html
.. _--soabi\:: objspace.soabi.html
.. _--withmod-errno\:: objspace.usemodules.errno.html
.. _--withmod-\_io\:: objspace.usemodules._io.html
.. _--withmod-\_sha\:: objspace.usemodules._sha.html
.. _--withmod-zlib\:: objspace.usemodules.zlib.html
.. _--objspace-std-withtproxy\:: objspace.std.withtproxy.html
.. _--withmod-\_hashlib\:: objspace.usemodules._hashlib.html
.. _--withmod-\_md5\:: objspace.usemodules._md5.html
.. _--objspace-lonepycfiles\:: objspace.lonepycfiles.html
.. _--withmod-exceptions\:: objspace.usemodules.exceptions.html
.. _--withmod-symbol\:: objspace.usemodules.symbol.html
.. _--withmod-\_warnings\:: objspace.usemodules._warnings.html
.. _--withmod-operator\:: objspace.usemodules.operator.html
.. _--withmod-\_minimal\_curses\:: objspace.usemodules._minimal_curses.html
.. _--withmod-\_sre\:: objspace.usemodules._sre.html
.. _--objspace-std-newshortcut\:: objspace.std.newshortcut.html
.. _--withmod-gc\:: objspace.usemodules.gc.html




.. _translation:
.. _`overview-of-command-line-options-for-translation`:

---------------------------
General translation options
---------------------------

The following are options of ``bin/rpython``.  They must be
given before the ``targetxxx`` on the command line.

* `--opt -O:`__ set the optimization level `[0, 1, size, mem, 2, 3]`

.. __: opt.html

* `-b --backend:`_ Backend to use for code generation

* `--cc:`_ Specify compiler to use for compiling generated C

* `--clever-malloc-removal:`_ Drives inlining to remove mallocs in a clever way

* `--clever-malloc-removal-threshold:`_ Threshold when to inline functions in
  clever malloc removal

* `--continuation:`_ enable single-shot continuations

* `--dont-write-c-files:`_ Make the C backend write everyting to /dev/null.
  Useful for benchmarking, so you don't actually involve the disk

* `--dump_static_data_info:`_ Dump static data info

* `--entrypoints:`_ Comma separated list of keys choosing secondary entrypoints

* `--fork-before:`_ (UNIX) Create restartable checkpoint before step

* `--gc:`_ Garbage Collection Strategy

* `--gcremovetypeptr:`_ Remove the typeptr from every object

* `--gcrootfinder:`_ Strategy for finding GC Roots (framework GCs only)

* `--if-block-merge:`_ Merge if ... elif chains

* `--inline-threshold:`_ Threshold when to inline functions

* `--jit-backend:`_ choose the backend for the JIT

* `--keepgoing:`_ Continue annotating when errors are encountered, and report
  them all at the end of the annotation phase

* `--listcompr:`_ When true, look for and special-case the sequence of
  operations that results from a list comprehension and attempt to pre-allocate
  the list

* `--lldebug:`_ If true, makes an lldebug build

* `--lldebug0:`_ If true, makes an lldebug0 build

* `--log:`_ Include debug prints in the translation (PYPYLOG=...)

* `--lto:`_ enable link time optimization

* `--make-jobs:`_ Specify -j argument to make for compilation (C backend only)

* `--no__thread:`_ don't use \_\_thread for implementing TLS

* `--output:`_ Output file name

* `--platform:`_ target platform

* `--profopt:`_ Enable profile guided optimization. Defaults to enabling this
  for PyPy. For other training workloads, please specify them in profoptargs

* `--profoptargs:`_ Absolute path to the profile guided optimization training
  script + the necessary arguments of the script

* `--sandbox:`_ Produce a fully-sandboxed executable

* `--shared:`_ Build as a shared library

* `--thread:`_ enable use of threading primitives

* `--translation-backendopt-constfold:`_ Constant propagation

* `--translation-backendopt-inline:`_ Do basic inlining and malloc removal

* `--translation-backendopt-mallocs:`_ Remove mallocs

* `--translation-backendopt-none:`_ Do not run any backend optimizations

* `--translation-backendopt-print_statistics:`_ Print statistics while
  optimizing

* `--translation-backendopt-profile_based_inline:`_ Use call count profiling to
  drive inlining, specify arguments

* `--translation-backendopt-profile_based_inline_threshold:`_ Threshold when to
  inline functions for profile based inlining

* `--translation-backendopt-really_remove_asserts:`_ Really remove operations
  that look like 'raise AssertionError', without relying on the C compiler

* `--translation-backendopt-remove_asserts:`_ Remove operations that look like
  'raise AssertionError', which lets the C optimizer remove the asserts

* `--translation-backendopt-stack_optimization:`_ Tranform graphs in SSI form
  into graphs tailored for stack based virtual machines (only for backends that
  support it)

* `--translation-backendopt-storesink:`_ Perform store sinking

* `--translation-icon:`_ Path to the (Windows) icon to use for the executable

* `--translation-jit:`_ generate a JIT

* `--translation-jit_opencoder_model:`_ the model limits the maximal length of
  traces. Use big if you want to go bigger than the default

* `--translation-jit_profiler:`_ integrate profiler support into the JIT

* `--translation-libname:`_ Windows\: name and possibly location of the lib
  file to create

* `--translation-rweakref:`_ The backend supports RPython-level weakrefs

* `--translation-taggedpointers:`_ When true, enable the use of tagged
  pointers. If false, use normal boxing

* `--translation-withsmallfuncsets:`_ Represent groups of less funtions than
  this as indices into an array

* `--verbose:`_ Print extra information

Internal Options
================

* `--clever-malloc-removal-heuristic:`_ Dotted name of an heuristic function
  for inlining in clever malloc removal
* `--inline-heuristic:`_ Dotted name of an heuristic function for inlining
* `--translation-backendopt-profile_based_inline_heuristic:`_ Dotted name of an
  heuristic function for profile based inlining

.. _--shared\:: translation.shared.html
.. _--translation-backendopt-print\_statistics\:: translation.backendopt.print_statistics.html
.. _--no\_\_thread\:: translation.no__thread.html
.. _--translation-rweakref\:: translation.rweakref.html
.. _--translation-backendopt-mallocs\:: translation.backendopt.mallocs.html
.. _--translation-backendopt-inline\:: translation.backendopt.inline.html
.. _--thread\:: translation.thread.html
.. _--translation-backendopt-profile\_based\_inline\_threshold\:: translation.backendopt.profile_based_inline_threshold.html
.. _--translation-withsmallfuncsets\:: translation.withsmallfuncsets.html
.. _--dont-write-c-files\:: translation.dont_write_c_files.html
.. _--dump\_static\_data\_info\:: translation.dump_static_data_info.html
.. _--lldebug\:: translation.lldebug.html
.. _--gcrootfinder\:: translation.gcrootfinder.html
.. _--keepgoing\:: translation.keepgoing.html
.. _--cc\:: translation.cc.html
.. _--entrypoints\:: translation.secondaryentrypoints.html
.. _--lto\:: translation.lto.html
.. _--translation-jit\:: translation.jit.html
.. _--output\:: translation.output.html
.. _--translation-backendopt-none\:: translation.backendopt.none.html
.. _--lldebug0\:: translation.lldebug0.html
.. _--if-block-merge\:: translation.backendopt.merge_if_blocks.html
.. _--platform\:: translation.platform.html
.. _--inline-threshold\:: translation.backendopt.inline_threshold.html
.. _--gc\:: translation.gc.html
.. _--jit-backend\:: translation.jit_backend.html
.. _--continuation\:: translation.continuation.html
.. _--translation-jit\_opencoder\_model\:: translation.jit_opencoder_model.html
.. _-b --backend\:: translation.backend.html
.. _--translation-icon\:: translation.icon.html
.. _--translation-libname\:: translation.libname.html
.. _--profopt\:: translation.profopt.html
.. _--translation-taggedpointers\:: translation.taggedpointers.html
.. _--fork-before\:: translation.fork_before.html
.. _--verbose\:: translation.verbose.html
.. _--translation-jit\_profiler\:: translation.jit_profiler.html
.. _--make-jobs\:: translation.make_jobs.html
.. _--profoptargs\:: translation.profoptargs.html
.. _--translation-backendopt-profile\_based\_inline\_heuristic\:: translation.backendopt.profile_based_inline_heuristic.html
.. _--clever-malloc-removal-threshold\:: translation.backendopt.clever_malloc_removal_threshold.html
.. _--sandbox\:: translation.sandbox.html
.. _--gcremovetypeptr\:: translation.gcremovetypeptr.html
.. _--clever-malloc-removal-heuristic\:: translation.backendopt.clever_malloc_removal_heuristic.html
.. _--translation-backendopt-stack\_optimization\:: translation.backendopt.stack_optimization.html
.. _--translation-backendopt-remove\_asserts\:: translation.backendopt.remove_asserts.html
.. _--translation-backendopt-profile\_based\_inline\:: translation.backendopt.profile_based_inline.html
.. _--translation-backendopt-really\_remove\_asserts\:: translation.backendopt.really_remove_asserts.html
.. _--inline-heuristic\:: translation.backendopt.inline_heuristic.html
.. _--listcompr\:: translation.list_comprehension_operations.html
.. _--log\:: translation.log.html
.. _--translation-backendopt-constfold\:: translation.backendopt.constfold.html
.. _--clever-malloc-removal\:: translation.backendopt.clever_malloc_removal.html
.. _--translation-backendopt-storesink\:: translation.backendopt.storesink.html


