Exemplo n.º 1
0
    'host',
    'distutils',
    'arm',
]

translation_optiondescription = OptionDescription(
    "translation",
    "Translation Options",
    [
        BoolOption("continuation",
                   "enable single-shot continuations",
                   default=False,
                   cmdline="--continuation",
                   requires=[("translation.type_system", "lltype")]),
        ChoiceOption("type_system",
                     "Type system to use when RTyping", ["lltype"],
                     cmdline=None,
                     default="lltype"),
        ChoiceOption("backend",
                     "Backend to use for code generation", ["c"],
                     default="c",
                     requires={
                         "c": [("translation.type_system", "lltype")],
                     },
                     cmdline="-b --backend"),
        BoolOption("shared",
                   "Build as a shared library",
                   default=False,
                   cmdline="--shared"),
        BoolOption("log",
                   "Include debug prints in the translation (PYPYLOG=...)",
                   default=True,
Exemplo n.º 2
0
                           "Don't " + doc,
                           default=False,
                           cmdline="--no-" + name,
                           negation=False))
    return result


translate_optiondescr = OptionDescription(
    "translate",
    "XXX",
    [
        StrOption(
            "targetspec", "XXX", default='targetpypystandalone', cmdline=None),
        ChoiceOption("opt",
                     "optimization level",
                     OPT_LEVELS,
                     default=DEFAULT_OPT_LEVEL,
                     cmdline="--opt -O"),
        BoolOption("profile",
                   "cProfile (to debug the speed of the translation process)",
                   default=False,
                   cmdline="--profile"),
        BoolOption("pdb",
                   "Always run pdb even if the translation succeeds",
                   default=False,
                   cmdline="--pdb"),
        BoolOption("batch",
                   "Don't run interactive helpers",
                   default=False,
                   cmdline="--batch",
                   negation=False),
Exemplo n.º 3
0
     cmdline="--soabi",
     default=None),
 BoolOption("honor__builtins__",
            "Honor the __builtins__ key of a module dictionary",
            default=False),
 BoolOption("disable_call_speedhacks",
            "make sure that all calls go through space.call_args",
            default=False),
 BoolOption("disable_entrypoints",
            "Disable external entry points, notably the"
            " cpyext module and cffi's embedding mode.",
            default=False,
            requires=[("objspace.usemodules.cpyext", False)]),
 ChoiceOption(
     "hash",
     "The hash function to use for strings: fnv from CPython 2.7"
     " or siphash24 from CPython >= 3.4", ["fnv", "siphash24"],
     default="fnv",
     cmdline="--hash"),
 OptionDescription("std", "Standard Object Space Options", [
     BoolOption(
         "withtproxy", "support transparent proxies", default=True),
     BoolOption("withprebuiltint",
                "prebuild commonly used int objects",
                default=False),
     IntOption("prebuiltintfrom",
               "lowest integer which is prebuilt",
               default=-5,
               cmdline="--prebuiltintfrom"),
     IntOption("prebuiltintto",
               "highest integer which is prebuilt",
               default=100,
Exemplo n.º 4
0
                    "deprecated, not really a shortcut any more.",
                    default=False),
                BoolOption(
                    "getattributeshortcut",
                    "track types that override __getattribute__",
                    default=False,
                    # weakrefs needed, because of get_subclasses()
                    requires=[("translation.rweakref", True)]),
                BoolOption(
                    "newshortcut",
                    "cache and shortcut calling __new__ from builtin types",
                    default=False,
                    # weakrefs needed, because of get_subclasses()
                    requires=[("translation.rweakref", True)]),
                ChoiceOption("multimethods",
                             "the multimethod implementation to use",
                             ["doubledispatch", "mrd"],
                             default="mrd"),
                BoolOption(
                    "withidentitydict",
                    "track types that override __hash__, __eq__ or __cmp__ and use a special dict strategy for those which do not",
                    default=False,
                    # weakrefs needed, because of get_subclasses()
                    requires=[("translation.rweakref", True)]),
            ]),
    ])


def get_pypy_config(overrides=None, translating=False):
    from rpython.config.translationoption import get_combined_translation_config
    return get_combined_translation_config(pypy_optiondescription,
                                           overrides=overrides,