Пример #1
0
def main():
    parser = optparse.OptionParser()
    parser.add_option(
        '-v',
        '--verbose',
        action='store_true',
        default=('LANDMINES_VERBOSE' in os.environ),
        help=
        ('Emit some extra debugging information (default off). This option '
         'is also enabled by the presence of a LANDMINES_VERBOSE environment '
         'variable.'))
    options, args = parser.parse_args()

    if args:
        parser.error('Unknown arguments %s' % args)

    logging.basicConfig(
        level=logging.DEBUG if options.verbose else logging.ERROR)

    gyp_helper.apply_chromium_gyp_env()

    for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'):
        set_up_landmines(target)

    return 0
Пример #2
0
def main():
    parser = optparse.OptionParser()
    parser.add_option(
        "-v",
        "--verbose",
        action="store_true",
        default=("LANDMINES_VERBOSE" in os.environ),
        help=(
            "Emit some extra debugging information (default off). This option "
            "is also enabled by the presence of a LANDMINES_VERBOSE environment "
            "variable."
        ),
    )
    options, args = parser.parse_args()

    if args:
        parser.error("Unknown arguments %s" % args)

    logging.basicConfig(level=logging.DEBUG if options.verbose else logging.ERROR)

    gyp_helper.apply_chromium_gyp_env()

    for target in ("Debug", "Release"):
        set_up_landmines(target)

    return 0
Пример #3
0
def main():
  landmine_scripts = process_options()
  gyp_helper.apply_chromium_gyp_env()

  for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'):
    landmines = []
    for s in landmine_scripts:
      proc = subprocess.Popen([sys.executable, s, '-t', target],
                              stdout=subprocess.PIPE)
      output, _ = proc.communicate()
      landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()])
    set_up_landmines(target, landmines)

  return 0
Пример #4
0
def main():
  landmine_scripts = process_options()
  gyp_helper.apply_chromium_gyp_env()

  for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'):
    landmines = []
    for s in landmine_scripts:
      proc = subprocess.Popen([sys.executable, s, '-t', target],
                              stdout=subprocess.PIPE)
      output, _ = proc.communicate()
      landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()])
    set_up_landmines(target, landmines)

  return 0
Пример #5
0
def SetEnvironment():
    """Sets defaults for GYP_* variables."""
    gyp_helper.apply_chromium_gyp_env()

    # Default to ninja on linux and windows, but only if no generator has
    # explicitly been set.
    # Also default to ninja on mac, but only when not building chrome/ios.
    # . -f / --format has precedence over the env var, no need to check for it
    # . set the env var only if it hasn't been set yet
    # . chromium.gyp_env has been applied to os.environ at this point already
    if sys.platform.startswith(('linux', 'win', 'freebsd', 'darwin')) and \
        not os.environ.get('GYP_GENERATORS'):
        os.environ['GYP_GENERATORS'] = 'ninja'

    vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
def SetEnvironment():
  """Sets defaults for GYP_* variables."""
  gyp_helper.apply_chromium_gyp_env()

  # Default to ninja on linux and windows, but only if no generator has
  # explicitly been set.
  # Also default to ninja on mac, but only when not building chrome/ios.
  # . -f / --format has precedence over the env var, no need to check for it
  # . set the env var only if it hasn't been set yet
  # . chromium.gyp_env has been applied to os.environ at this point already
  if sys.platform.startswith(('linux', 'win', 'freebsd', 'darwin')) and \
      not os.environ.get('GYP_GENERATORS'):
    os.environ['GYP_GENERATORS'] = 'ninja'

  vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
Пример #7
0
def main():
  parser = optparse.OptionParser()
  parser.add_option('-v', '--verbose', action='store_true',
      default=('LANDMINES_VERBOSE' in os.environ),
      help=('Emit some extra debugging information (default off). This option '
          'is also enabled by the presence of a LANDMINES_VERBOSE environment '
          'variable.'))
  options, args = parser.parse_args()

  if args:
    parser.error('Unknown arguments %s' % args)

  logging.basicConfig(
      level=logging.DEBUG if options.verbose else logging.ERROR)

  gyp_helper.apply_chromium_gyp_env()

  for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'):
    set_up_landmines(target)

  return 0
Пример #8
0
# Workaround the dynamic path.
# pylint: disable=g-import-not-at-top,g-bad-import-order

sys.path.insert(0, os.path.join(src_dir, 'build'))
import detect_host_arch
import gyp_helper

sys.path.insert(0, os.path.join(src_dir, 'tools', 'gyp', 'pylib'))
import gyp

if __name__ == '__main__':
  args = sys.argv[1:]

  # Allow src/.../chromium.gyp_env to define GYP variables.
  gyp_helper.apply_chromium_gyp_env()

  # If we didn't get a gyp file, then fall back to assuming 'packager.gyp' from
  # the same directory as the script.
  if [arg.endswith('.gyp') for arg in args].count(True) == 0:
    args.append(os.path.join(src_dir, 'packager.gyp'))

  # Always include common.gypi.
  args.extend(['-I' + os.path.join(src_dir, 'build', 'common.gypi')])

  # Set these default GYP_DEFINES if user does not set the value explicitly.
  _DEFAULT_DEFINES = {'test_isolation_mode': 'noop',
                      'use_glib': 0,
                      'use_openssl': 1,
                      'use_x11': 0,
                      'linux_use_gold_binary': 0,
Пример #9
0
sys.path.insert(0, os.path.join(src_dir, 'tools', 'gyp', 'pylib'))
import gyp

# Add paths so that pymod_do_main(...) can import files.
sys.path.insert(1, os.path.join(src_dir, 'build', 'android', 'gyp'))
sys.path.insert(1, os.path.join(src_dir, 'build'))
sys.path.insert(1, os.path.join(src_dir, 'tools'))
# sys.path.insert(1, os.path.join(src_dir, 'tools', 'generate_shim_headers'))
sys.path.insert(1, os.path.join(src_dir, 'tools', 'grit'))

if __name__ == '__main__':
    args = sys.argv[1:]

    # Allow src/.../chromium.gyp_env to define GYP variables.
    gyp_helper.apply_chromium_gyp_env()

    # If we didn't get a gyp file, then fall back to assuming 'packager.gyp' from
    # the same directory as the script.
    if [arg.endswith('.gyp') for arg in args].count(True) == 0:
        args.append(os.path.join(src_dir, 'downloader/downloader.gyp'))

    # Always include common.gypi.
    args.extend(['-I' + os.path.join(src_dir, 'build', 'common.gypi')])

    # Set these default GYP_DEFINES if user does not set the value explicitly.
    _DEFAULT_DEFINES = {
        'test_isolation_mode': 'noop',
        'use_glib': 0,
        'use_openssl': 1,
        'use_x11': 0,