Exemplo n.º 1
0
from __future__ import print_function

from optparse import OptionParser
import os
import sys
import platform_helper
sys.path.insert(0, 'misc')

import ninja_syntax

parser = OptionParser()
profilers = ['gmon', 'pprof']
parser.add_option('--platform',
                  help='target platform (' +
                  '/'.join(platform_helper.platforms()) + ')',
                  choices=platform_helper.platforms())
parser.add_option('--host',
                  help='host platform (' +
                  '/'.join(platform_helper.platforms()) + ')',
                  choices=platform_helper.platforms())
parser.add_option(
    '--debug',
    action='store_true',
    help='enable debugging extras',
)
parser.add_option(
    '--profile',
    metavar='TYPE',
    choices=profilers,
    help='enable profiling (' + '/'.join(profilers) + ')',
Exemplo n.º 2
0
import errno
import shlex
import shutil
import subprocess
import platform_helper

os.chdir(os.path.dirname(os.path.abspath(__file__)))

parser = OptionParser()

parser.add_option('--verbose', action='store_true',
                  help='enable verbose build',)
parser.add_option('--x64', action='store_true',
                  help='force 64-bit build (Windows)',)
parser.add_option('--platform',
                  help='target platform (' + '/'.join(platform_helper.platforms()) + ')',
                  choices=platform_helper.platforms())
parser.add_option('--force-pselect', action='store_true',
                  help="ppoll() is used by default on Linux, OpenBSD and Bitrig, but older versions might need to use pselect instead",)
(options, conf_args) = parser.parse_args()


platform = platform_helper.Platform(options.platform)
conf_args.append("--platform=" + platform.platform())

def run(*args, **kwargs):
    returncode = subprocess.call(*args, **kwargs)
    if returncode != 0:
        sys.exit(returncode)

# Compute system-specific CFLAGS/LDFLAGS as used in both in the below
Exemplo n.º 3
0
from __future__ import print_function

from optparse import OptionParser
import os
import sys
import platform_helper
sys.path.insert(0, 'misc')

import ninja_syntax

parser = OptionParser()
profilers = ['gmon', 'pprof']
parser.add_option('--platform',
                  help='target platform (' +
                       '/'.join(platform_helper.platforms()) + ')',
                  choices=platform_helper.platforms())
parser.add_option('--host',
                  help='host platform (' +
                       '/'.join(platform_helper.platforms()) + ')',
                  choices=platform_helper.platforms())
parser.add_option('--debug', action='store_true',
                  help='enable debugging extras',)
parser.add_option('--profile', metavar='TYPE',
                  choices=profilers,
                  help='enable profiling (' + '/'.join(profilers) + ')',)
parser.add_option('--with-gtest', metavar='PATH',
                  help='use gtest unpacked in directory PATH')
parser.add_option('--with-python', metavar='EXE',
                  help='use EXE as the Python interpreter',
                  default=os.path.basename(sys.executable))
Exemplo n.º 4
0
from __future__ import print_function

from optparse import OptionParser
import os
import sys
import platform_helper

sys.path.insert(0, "misc")

import ninja_syntax

parser = OptionParser()
profilers = ["gmon", "pprof"]
parser.add_option(
    "--platform",
    help="target platform (" + "/".join(platform_helper.platforms()) + ")",
    choices=platform_helper.platforms(),
)
parser.add_option(
    "--host", help="host platform (" + "/".join(platform_helper.platforms()) + ")", choices=platform_helper.platforms()
)
parser.add_option("--debug", action="store_true", help="enable debugging extras")
parser.add_option("--profile", metavar="TYPE", choices=profilers, help="enable profiling (" + "/".join(profilers) + ")")
parser.add_option("--with-gtest", metavar="PATH", help="ignored")
parser.add_option(
    "--with-python", metavar="EXE", help="use EXE as the Python interpreter", default=os.path.basename(sys.executable)
)
parser.add_option(
    "--force-pselect",
    action="store_true",
    help="ppoll() is used by default where available, " "but some platforms may need to use pselect instead",