Exemplo n.º 1
0
def get_build_dir(build_tool, is_iphone=False):
    """
  Returns output directory absolute path dependent on build and targets.
  Examples:
    r'c:\b\build\slave\win\build\src\out'
    '/mnt/data/b/build/slave/linux/build/src/out'
    '/b/build/slave/ios_rel_device/build/src/xcodebuild'

  Keep this function in sync with tools/build/scripts/slave/compile.py
  """
    ret = None
    if build_tool == 'xcode':
        ret = os.path.join(SRC_DIR, 'xcodebuild')
    elif build_tool in ['make', 'ninja',
                        'ninja-ios']:  # TODO: Remove ninja-ios.
        if ('CHROMIUM_OUT_DIR' not in os.environ
                and 'output_dir' in landmine_utils.gyp_generator_flags()):
            output_dir = landmine_utils.gyp_generator_flags()['output_dir']
        else:
            output_dir = os.environ.get('CHROMIUM_OUT_DIR', 'out')
        ret = os.path.join(SRC_DIR, output_dir)
    else:
        raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' %
                                  build_tool)
    return os.path.abspath(ret)
Exemplo n.º 2
0
def get_build_dir(build_tool, is_iphone=False):
  """
  Returns output directory absolute path dependent on build and targets.
  Examples:
    r'c:\b\build\slave\win\build\src\out'
    '/mnt/data/b/build/slave/linux/build/src/out'
    '/b/build/slave/ios_rel_device/build/src/xcodebuild'

  Keep this function in sync with tools/build/scripts/slave/compile.py
  """
  ret = None
  if build_tool == 'xcode':
    ret = os.path.join(SRC_DIR, 'xcodebuild')
  elif build_tool in ['make', 'ninja', 'ninja-ios']:  # TODO: Remove ninja-ios.
    if 'CHROMIUM_OUT_DIR' in os.environ:
      output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
      if not output_dir:
        raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
    else:
      output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
    ret = os.path.join(SRC_DIR, output_dir)
  elif build_tool in ['msvs', 'vs', 'ib']:
    ret = os.path.join(SRC_DIR, 'build')
  else:
    raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool)
  return os.path.abspath(ret)
Exemplo n.º 3
0
def get_build_dir(src_dir):
  """
  Returns output directory absolute path dependent on build and targets.
  Examples:
    r'c:\b\build\slave\win\build\src\out'
    '/mnt/data/b/build/slave/linux/build/src/out'
    '/b/build/slave/ios_rel_device/build/src/out'

  Keep this function in sync with tools/build/scripts/slave/compile.py
  """
  if 'CHROMIUM_OUT_DIR' in os.environ:
    output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
    if not output_dir:
      raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
  else:
    output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
  return os.path.abspath(os.path.join(src_dir, output_dir))
Exemplo n.º 4
0
def get_build_dir(src_dir):
  """
  Returns output directory absolute path dependent on build and targets.
  Examples:
    r'c:\b\build\slave\win\build\src\out'
    '/mnt/data/b/build/slave/linux/build/src/out'
    '/b/build/slave/ios_rel_device/build/src/out'

  Keep this function in sync with tools/build/scripts/slave/compile.py
  """
  if 'CHROMIUM_OUT_DIR' in os.environ:
    output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
    if not output_dir:
      raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
  else:
    output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
  return os.path.abspath(os.path.join(src_dir, output_dir))