当前位置: 首页>>代码示例>>Python>>正文


Python OPTIONS.set_up_goma方法代码示例

本文整理汇总了Python中src.build.build_options.OPTIONS.set_up_goma方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.set_up_goma方法的具体用法?Python OPTIONS.set_up_goma怎么用?Python OPTIONS.set_up_goma使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在src.build.build_options.OPTIONS的用法示例。


在下文中一共展示了OPTIONS.set_up_goma方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _configure_build_options

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import set_up_goma [as 别名]
def _configure_build_options():
  if OPTIONS.parse(sys.argv[1:]):
    print 'Args error'
    return False

  # Write out the configure file early so all other scripts can use
  # the options passed into configure. (e.g., sync_chrome).
  OPTIONS.write_configure_file()

  # Target directory is replaced. If an old directory, out/target/<target>,
  # exists, move it to the new place, out/target/<target>_<opt>.
  old_path = os.path.join('out/target', OPTIONS.target())
  new_path = build_common.get_build_dir()
  if os.path.lexists(old_path):
    if os.path.isdir(old_path) and not os.path.islink(old_path):
      if os.path.exists(new_path):
        file_util.rmtree(old_path)
      else:
        shutil.move(old_path, new_path)
    else:
      os.remove(old_path)

  # Create an empty directory as a placeholder if necessary.
  file_util.makedirs_safely(new_path)

  # Create a symlink from new place to old place to keep as compatible as
  # possible.
  os.symlink(os.path.basename(new_path), old_path)

  # Write out the configure file to a target specific location, which can be
  # queried later to find out what the config for a target was.
  OPTIONS.write_configure_file(build_common.get_target_configure_options_file())

  OPTIONS.set_up_goma()
  return True
开发者ID:epowers,项目名称:arc,代码行数:37,代码来源:configure.py

示例2: _get_ninja_jobs_argument

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import set_up_goma [as 别名]
def _get_ninja_jobs_argument():
    # -j200 might be good because having more tasks doesn't help a
    # lot and Z620 doesn't die even if everything runs locally for
    # some reason.
    if OPTIONS.set_up_goma():
        OPTIONS.wait_for_goma_ctl()
        return ["-j200", "-l40"]
    return []
开发者ID:nehz,项目名称:google-arc,代码行数:10,代码来源:build_common.py


注:本文中的src.build.build_options.OPTIONS.set_up_goma方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。