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


Python OPTIONS.is_nacl_build方法代码示例

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


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

示例1: _compute_chrome_diagnostic_params

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _compute_chrome_diagnostic_params(parsed_args):
  if OPTIONS.is_nacl_build():
    opt = '--nacl-loader-cmd-prefix'
  else:
    opt = '--ppapi-plugin-launcher'

  params = []
  # Loading NaCl module gets stuck if --enable-logging=stderr is specified
  # together with --perfstartup.
  # TODO(crbug.com/276891): Investigate the root cause of the issue and fix it.
  if OPTIONS.is_nacl_build() and parsed_args.perfstartup:
    params.append('--enable-logging')
  else:
    params.append('--enable-logging=stderr')
  params.append('--log-level=0')

  if parsed_args.tracestartup > 0:
    params.append('--trace-startup')
    params.append('--trace-startup-duration=%d' % parsed_args.tracestartup)

  if parsed_args.perfstartup:
    params.append('%s=timeout -s INT %s %s record -gf -o out/perf.data' %
                  (opt, parsed_args.perfstartup, _PERF_TOOL))

  return params
开发者ID:NaiveTorch,项目名称:ARC,代码行数:27,代码来源:launch_chrome.py

示例2: _get_app_mem_info

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _get_app_mem_info(pid):
  """Returns a pair (res, virt) showing the process memory usage in MB."""
  stat = _get_process_stat_line(pid).split()
  res = float(stat[23]) * 4096 / 1024 / 1024
  # On NaCl, hide uselessly and confusingly big vsize due to memory mapping.
  virt = 0 if OPTIONS.is_nacl_build() else float(stat[22]) / 1024 / 1024
  return (res, virt)
开发者ID:NaiveTorch,项目名称:ARC,代码行数:9,代码来源:output_handler.py

示例3: _kill_running_chrome

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _kill_running_chrome():
  pid = _read_chrome_pid_file()
  if pid is None:
    return

  try:
    if OPTIONS.is_nacl_build():
      # For now use sigkill, as NaCl's debug stub seems to cause sigterm to
      # be ignored.
      os.kill(pid, signal.SIGKILL)
    else:
      os.kill(pid, signal.SIGTERM)

    # Unfortunately, there is no convenient API to wait subprocess's
    # termination with timeout. So, here we just poll it.
    wait_time_limit = time.time() + _CHROME_KILL_TIMEOUT
    while True:
      retpid, status = os.waitpid(pid, os.WNOHANG)
      if retpid:
        break
      now = time.time()
      if now > wait_time_limit:
        logging.error('Terminating Chrome is timed out: %d', pid)
        break
      time.sleep(min(_CHROME_KILL_DELAY, wait_time_limit - now))
  except OSError:
    # Here we ignore the OS error. The process may have been terminated somehow
    # by external reason, while the file still exists on the file system.
    pass

  _remove_chrome_pid_file(pid)
开发者ID:NaiveTorch,项目名称:ARC,代码行数:33,代码来源:launch_chrome.py

示例4: main

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
  def main(self):
    args = []

    if self._enable_play_services:
      variant = '+play_services'
      # Enable minimum service as baseline
      args += ['--additional-metadata', '{"usePlayServices": ["gcm"]}']
    else:
      variant = ''

    if self._args.test_mode:
      output = self._load_output()
    else:
      if OPTIONS.is_nacl_build():
        # Enable to allow collecting memory usage on NaCl
        args += ['--enable-nacl-list-mappings']
      self._perftest(args)
      output = self._load_output()
      logging.debug(_OUTPUT_DUMP_FORMAT % output)

    data = self._parse_output(output)
    if data:
      self._post(data, variant)
    else:
      logging.error(_OUTPUT_DUMP_FORMAT % output)
      sys.exit(-1)
开发者ID:NaiveTorch,项目名称:ARC,代码行数:28,代码来源:perf_test.py

示例5: _generate_runnable_ld_ninja

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _generate_runnable_ld_ninja():
  linker_script = _generate_linker_script_for_runnable_ld()

  # Not surprisingly, bionic's loader is built with a special hack to
  # Android's build system so we cannot use MakefileNinjaTranslator.
  n = ninja_generator.ExecNinjaGenerator('runnable-ld.so',
                                         base_path='android/bionic/linker',
                                         install_path='/lib',
                                         is_system_library=True)
  _add_runnable_ld_cflags(n)

  n.add_library_deps('libc_bionic_linker.a')  # logging functions
  n.add_library_deps('libc_common_linker.a')
  n.add_library_deps('libc_freebsd_linker.a')  # __swsetup etc.
  sources = n.find_all_sources()
  sources.extend(['android/bionic/libc/arch-nacl/syscalls/irt_syscalls.c',
                  'android/bionic/libc/bionic/__errno.c',
                  'android/bionic/libc/bionic/pthread.c',
                  'android/bionic/libc/bionic/pthread_create.cpp',
                  'android/bionic/libc/bionic/pthread_internals.cpp',
                  'android/bionic/libc/bionic/pthread_key.cpp'])
  if OPTIONS.is_bare_metal_build():
    # Remove SFI NaCl specific dynamic code allocation.
    sources.remove('android/bionic/linker/arch/nacl/nacl_dyncode_alloc.c')
    sources.remove('android/bionic/linker/arch/nacl/nacl_dyncode_map.c')
  _remove_assembly_source(sources)
  # NaCl has no signals so debugger support cannot be implemented.
  sources.remove('android/bionic/linker/debugger.cpp')

  # n.find_all_sources() picks up this upstream file regardless of the
  # current target. For ARM, the file is obviously irrelevant. For i686
  # and x86_64, we use our own begin.c.
  sources.remove('android/bionic/linker/arch/x86/begin.c')

  ldflags = n.get_ldflags()
  if OPTIONS.is_nacl_build():
    ldflags += (' -T ' + linker_script +
                ' -Wl,-Ttext,' + _LOADER_TEXT_SECTION_START_ADDRESS)
  else:
    # We need to use recent linkers for __ehdr_start.
    ldflags += ' -pie'
  # See the comment in linker/arch/nacl/begin.c.
  ldflags += ' -Wl,--defsym=__linker_base=0'
  # --gc-sections triggers an assertion failure in GNU ld for ARM for
  # --opt build. The error message is very similar to the message in
  # https://sourceware.org/bugzilla/show_bug.cgi?id=13990
  # Once NaCl team updates the version of their binutils, we might be
  # able to remove this.
  if not OPTIONS.is_arm():
    ldflags += ' -Wl,--gc-sections'
  if not OPTIONS.is_debug_info_enabled():
    ldflags += ' -Wl,--strip-all'
  n.add_library_deps(*ninja_generator.get_libgcc_for_bionic())
  n.add_library_deps('libbionic_ssp.a')
  n.build_default(sources, base_path=None)
  n.link(variables={'ldflags': ldflags}, implicit=linker_script)
开发者ID:NaiveTorch,项目名称:ARC,代码行数:58,代码来源:config.py

示例6: _get_nacl_irt_path

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _get_nacl_irt_path(parsed_args):
  if not OPTIONS.is_nacl_build():
    return None
  chrome_path = _get_chrome_path(parsed_args)
  irt = toolchain.get_tool(OPTIONS.target(), 'irt')
  nacl_irt_path = os.path.join(os.path.dirname(chrome_path), irt)
  nacl_irt_debug_path = nacl_irt_path + '.debug'
  # Use debug version nacl_irt if it exists.
  if os.path.exists(nacl_irt_debug_path):
    return nacl_irt_debug_path
  else:
    return nacl_irt_path
开发者ID:NaiveTorch,项目名称:ARC,代码行数:14,代码来源:launch_chrome.py

示例7: _get_bionic_fundamental_tests

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _get_bionic_fundamental_tests():
  tests = []
  # This uses NaCl syscalls directly and is not compatible with Bare
  # Metal mode.
  if OPTIONS.is_nacl_build():
    # If this passes, the loader is working.
    tests.append(('loader_test', ['$runner', '$test_binary'], {}))
  tests.extend([
      # If this passes, IRT calls are ready.
      ('write_test', ['$runner', '$test_binary'], {}),
      # If this passes, stdio and malloc are ready.
      ('printf_test', ['$runner', '$test_binary'], {}),
      # If this passes, arguments and environment variables are OK.
      ('args_test', ['$runner', '$test_binary', 'foobar'], {}),
      # If this passes, .ctors and .dtors are working.
      ('structors_test', ['$runner', '$test_binary'], {}),
      # If this passes, symbols are available for subsequently loaded binaries.
      ('resolve_parent_sym_test',
       ['$runner_with_extra_ld_library_path', '$test_binary'], {}),
      # If this passes, .ctors and .dtors with DT_NEEDED are working.
      ('so_structors_test',
       ['$runner_with_extra_ld_library_path', '$test_binary'], {}),
      # If this passes, .ctors and .dtors with dlopen are working.
      ('dlopen_structors_test',
       ['$runner_with_extra_ld_library_path', '$test_binary'], {}),
      # If this passes, dlopen fails properly when there is a missing symbol.
      ('dlopen_error_test',
       ['$runner_with_extra_ld_library_path', '$test_binary'], {}),
  ])
  # Bionic does not restart .fini_array when exit() is called in global
  # destructors. This works only for environments which use
  # .fini/.dtors. Currently, Bare Metal uses .fini_array.
  if not OPTIONS.is_arm() and OPTIONS.is_nacl_build():
    # If this passes, exit() in global destructors is working. Note
    # that Bionic does not continue atexit handlers in an exit call so
    # we cannot test this case with other structors_tests.
    tests.append(('dlopen_structors_test-with_exit',
                  ['$runner_with_extra_ld_library_path', '$test_binary'],
                  {'CALL_EXIT_IN_DESTRUCTOR': '1'}))
  return tests
开发者ID:NaiveTorch,项目名称:ARC,代码行数:42,代码来源:run_bionic_fundamental_tests.py

示例8: _compute_chrome_sandbox_params

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _compute_chrome_sandbox_params(parsed_args):
  params = []
  if _is_no_sandbox_needed(parsed_args):
    params.append('--no-sandbox')
    if OPTIONS.is_bare_metal_build():
      # Non-SFI NaCl helper, which heavily depends on seccomp-bpf,
      # does not start without seccomp sandbox initialized unless we
      # specify this flag explicitly.
      params.append('--nacl-dangerous-no-sandbox-nonsfi')

  # Environment variables to pass through to nacl_helper.
  passthrough_env_vars = []

  if OPTIONS.is_nacl_build() and parsed_args.disable_nacl_sandbox:
    os.environ['NACL_DANGEROUS_ENABLE_FILE_ACCESS'] = '1'
    passthrough_env_vars.append('NACL_DANGEROUS_ENABLE_FILE_ACCESS')
  if OPTIONS.is_nacl_build() and parsed_args.enable_nacl_list_mappings:
    os.environ['NACL_DANGEROUS_ENABLE_LIST_MAPPINGS'] = '1'
    passthrough_env_vars.append('NACL_DANGEROUS_ENABLE_LIST_MAPPINGS')
  if passthrough_env_vars:
    os.environ['NACL_ENV_PASSTHROUGH'] = ','.join(passthrough_env_vars)
  return params
开发者ID:NaiveTorch,项目名称:ARC,代码行数:24,代码来源:launch_chrome.py

示例9: main

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def main():
  OPTIONS.parse_configure_file()
  test_args = sys.argv[1:]
  if not test_args:
    print 'Usage: %s test_binary [test_args...]' % sys.argv[0]
    sys.exit(1)

  # This script must not die by Ctrl-C while GDB is running. We simply
  # ignore SIGINT. Note that GDB will still handle Ctrl-C properly
  # because GDB sets its signal handler by itself.
  signal.signal(signal.SIGINT, signal.SIG_IGN)

  runner_args = toolchain.get_tool(OPTIONS.target(), 'runner').split()
  if OPTIONS.is_nacl_build():
    _run_gdb_for_nacl(runner_args, test_args)
  elif OPTIONS.is_bare_metal_build():
    if OPTIONS.is_arm():
      _run_gdb_for_bare_metal_arm(runner_args, test_args)
    else:
      _run_gdb_for_bare_metal(runner_args, test_args)
开发者ID:NaiveTorch,项目名称:ARC,代码行数:22,代码来源:run_under_gdb.py

示例10: _compute_chrome_debugging_params

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _compute_chrome_debugging_params(parsed_args):
  params = []

  # This reduce one step necessary to enable filesystem inspector.
  params.append('--enable-devtools-experiments')

  if OPTIONS.is_nacl_build() and 'plugin' in parsed_args.gdb:
    params.append('--enable-nacl-debug')

  if len(parsed_args.gdb):
    params.append('--disable-hang-monitor')

  if 'gpu' in parsed_args.gdb:
    params.append('--gpu-startup-dialog')
    params.append('--disable-gpu-watchdog')

  if 'renderer' in parsed_args.gdb:
    params.append('--renderer-startup-dialog')

  if parsed_args.enable_fake_video_source:
    params.append('--use-fake-device-for-media-stream')

  return params
开发者ID:NaiveTorch,项目名称:ARC,代码行数:25,代码来源:launch_chrome.py

示例11: _terminate_chrome

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _terminate_chrome(chrome):
  _remove_chrome_pid_file(chrome.pid)

  if chrome.poll() is not None:
    # The chrome process is already terminated.
    return

  if OPTIONS.is_nacl_build():
    # For now use sigkill, as NaCl's debug stub seems to cause sigterm to
    # be ignored.
    chrome.kill()
  else:
    chrome.terminate()

  # Unfortunately, there is no convenient API to wait subprocess's termination
  # with timeout. So, here we just poll it.
  wait_time_limit = time.time() + _CHROME_KILL_TIMEOUT
  while True:
    if chrome.poll() is not None:
      break
    now = time.time()
    if now > wait_time_limit:
      break
    time.sleep(min(_CHROME_KILL_DELAY, wait_time_limit - now))
开发者ID:NaiveTorch,项目名称:ARC,代码行数:26,代码来源:launch_chrome.py

示例12: _generate_bionic_fundamental_tests

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _generate_bionic_fundamental_tests():
  n = ninja_generator.NinjaGenerator('bionic_fundamental_tests')
  bionic_tests = []
  if OPTIONS.is_nacl_build():
    # This uses NaCl syscalls directly and is not compatible with Bare
    # Metal mode.
    bionic_tests.append(
        BionicFundamentalTest(
            'loader_test', ['$in_dir/$name.c'], '$out',
            [['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
              '-L$lib_dir', '-lc'] +
             ninja_generator.get_libgcc_for_bionic() +
             ['-ldl', '$$in', '-o', '$$out']]))
  bionic_tests.extend([
      BionicFundamentalTest(
          'write_test', ['$in_dir/$name.c'], '$out',
          [['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$$in', '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'printf_test', ['$in_dir/$name.c'], '$out',
          [['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$$in', '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'args_test', ['$in_dir/$name.c'], '$out',
          [['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$$in', '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'structors_test', ['$in_dir/$name.c'], '$out',
          [['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$$in', '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'resolve_parent_sym_test',
          ['$in_dir/$name.c',
           '$in_dir/${name}_first.c', '$in_dir/${name}_second.c'],
          '$out',
          [['$cc', '$cflags', '$ldflags', '-nostdlib',
            '$crtbegin_so', '-L$lib_dir', '-lc',
            '$in_dir/${name}_second.c', '$crtend_so',
            '$soflags', '-o', '$out_dir/lib${name}_second.so'],
           ['$cc', '$cflags', '$ldflags', '-nostdlib',
            '-L$out_dir', '-l${name}_second',
            '$crtbegin_so', '-L$lib_dir', '-lc',
            '$in_dir/${name}_first.c', '$crtend_so',
            '$soflags', '-o', '$out_dir/lib${name}_first.so'],
           ['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '-rdynamic', '-L$out_dir',
            '-Wl,--rpath-link=$out_dir', '-l${name}_first',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$$in', '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'so_structors_test',
          ['$in_dir/$name.c', '$in_dir/structors_test.c'],
          '$out',
          [['$cc', '$cflags', '-DFOR_SHARED_OBJECT',
            '$ldflags', '-nostdlib',
            '$crtbegin_so', '-L$lib_dir', '-lc',
            '$in_dir/structors_test.c', '$crtend_so',
            '$soflags', '-o', '$out_dir/libstructors_test.so'],
           ['$cc', '$cflags', '$ldflags', '$execflags',
            '-nostdlib', '-rdynamic',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$in_dir/$name.c',
            '-L$out_dir', '-Wl,--rpath-link=$out_dir', '-lstructors_test',
            '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'dlopen_structors_test', ['$in_dir/$name.c'], '$out',
          [['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['$$in', '-ldl', '$crtend_exe', '-o', '$$out']]),
      BionicFundamentalTest(
          'dlopen_error_test',
          ['$in_dir/$name.c',
           '$in_dir/use_undefined_sym.c', '$in_dir/use_use_undefined_sym.c'],
          '$out',
          [['$cc', '$cflags', '$ldflags', '-nostdlib',
            '$crtbegin_so', '-L$lib_dir', '-lc',
            '$in_dir/use_undefined_sym.c', '$crtend_so',
            '$soflags', '-o', '$out_dir/libuse_undefined_sym.so'],
           ['$cc', '$cflags', '$ldflags', '-nostdlib',
            '-L$out_dir', '-luse_undefined_sym',
            '$crtbegin_so', '-L$lib_dir', '-lc',
            '$in_dir/use_use_undefined_sym.c', '$crtend_so',
            '$soflags', '-o', '$out_dir/libuse_use_undefined_sym.so'],
           ['$cc', '$cflags', '$ldflags', '$execflags', '-nostdlib',
            '-rdynamic', '-L$out_dir',
            '$crtbegin_exe', '-L$lib_dir', '-lc'] +
           ninja_generator.get_libgcc_for_bionic() +
           ['-ldl', '$in_dir/$name.c', '$crtend_exe', '-o', '$$out']]),
  ])
#.........这里部分代码省略.........
开发者ID:NaiveTorch,项目名称:ARC,代码行数:103,代码来源:config.py

示例13: _get_asm_source

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _get_asm_source(f):
  # For NaCl, we need to use naclized version of aseembly code.
  if OPTIONS.is_nacl_build():
    f = os.path.join(_get_gen_source_dir(), os.path.basename(f))
  return f
开发者ID:NaiveTorch,项目名称:ARC,代码行数:7,代码来源:config.py

示例14: _filter_libc_common

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _filter_libc_common(vars):
  sources = vars.get_sources()
  _remove_assembly_source(sources)
  # libc_common is used from both the loader and libc.so. Functions
  # which are necessary for the bionic loader must be in this list.
  sources.extend([
      # TODO(crbug.com/243244): If possible, move arch-nacl/ files into a
      # separate archive and build them with -Werror.
      'android/bionic/libc/arch-nacl/bionic/__get_sp.c',
      'android/bionic/libc/arch-nacl/bionic/__set_tls.c',
      'android/bionic/libc/arch-nacl/bionic/clone.c',
      'android/bionic/libc/arch-nacl/bionic/popcount.c',
      'android/bionic/libc/arch-nacl/syscalls/__getcwd.c',
      'android/bionic/libc/arch-nacl/syscalls/__open.c',
      'android/bionic/libc/arch-nacl/syscalls/_exit.c',
      'android/bionic/libc/arch-nacl/syscalls/_exit_thread.c',
      'android/bionic/libc/arch-nacl/syscalls/clock_getres.c',
      'android/bionic/libc/arch-nacl/syscalls/clock_gettime.c',
      'android/bionic/libc/arch-nacl/syscalls/close.c',
      'android/bionic/libc/arch-nacl/syscalls/dup.c',
      'android/bionic/libc/arch-nacl/syscalls/dup2.c',
      'android/bionic/libc/arch-nacl/syscalls/enosys.c',
      'android/bionic/libc/arch-nacl/syscalls/fdatasync.c',
      'android/bionic/libc/arch-nacl/syscalls/fstat.c',
      'android/bionic/libc/arch-nacl/syscalls/fsync.c',
      'android/bionic/libc/arch-nacl/syscalls/futex.c',
      'android/bionic/libc/arch-nacl/syscalls/getdents.c',
      'android/bionic/libc/arch-nacl/syscalls/getpid.c',
      'android/bionic/libc/arch-nacl/syscalls/gettid.c',
      'android/bionic/libc/arch-nacl/syscalls/gettimeofday.c',
      'android/bionic/libc/arch-nacl/syscalls/getuid.c',
      'android/bionic/libc/arch-nacl/syscalls/lseek.c',
      'android/bionic/libc/arch-nacl/syscalls/lseek64.c',
      'android/bionic/libc/arch-nacl/syscalls/lstat.c',
      'android/bionic/libc/arch-nacl/syscalls/mmap.c',
      'android/bionic/libc/arch-nacl/syscalls/mprotect.c',
      'android/bionic/libc/arch-nacl/syscalls/munmap.c',
      'android/bionic/libc/arch-nacl/syscalls/nacl_stat.c',
      'android/bionic/libc/arch-nacl/syscalls/nacl_timespec.c',
      'android/bionic/libc/arch-nacl/syscalls/nacl_timeval.c',
      'android/bionic/libc/arch-nacl/syscalls/read.c',
      'android/bionic/libc/arch-nacl/syscalls/stat.c',
      'android/bionic/libc/arch-nacl/syscalls/unlink.c',
      'android/bionic/libc/arch-nacl/syscalls/write.c',
      'android/bionic/libc/arch-nacl/syscalls/writev.c',
      'android/bionic/libc/arch-nacl/tmp/raw_print.c',
      # TODO(crbug.com/352917): Use assembly version on Bare Metal ARM.
      'android/bionic/libc/bionic/memcmp.c',
      'android/bionic/libc/bionic/memcpy.c',
      'android/bionic/libc/bionic/property_service.c',
      'android/bionic/libc/string/ffs.c',
      'android/bionic/libc/string/strcat.c',
      'android/bionic/libc/string/strcmp.c',
      'android/bionic/libc/string/strlen.c'])
  if OPTIONS.is_nacl_build():
    # They define SFI NaCl specific functions for dynamic code.
    sources.extend([
        'android/bionic/libc/arch-nacl/syscalls/__allocate_nacl_dyncode.c',
        'android/bionic/libc/arch-nacl/syscalls/nacl_dyncode_create.c',
        'android/bionic/libc/arch-nacl/syscalls/nacl_dyncode_delete.c',
        'android/bionic/libc/arch-nacl/syscalls/nacl_list_mappings.c'])

  if OPTIONS.is_arm():
    # TODO(crbug.com/352917): Use assembly version on Bare Metal ARM.
    sources.extend([
        'android/bionic/libc/bionic/__memcpy_chk.cpp',
        'android/bionic/libc/bionic/__memset_chk.cpp',
        'android/bionic/libc/bionic/__strcat_chk.cpp',
        'android/bionic/libc/bionic/__strcpy_chk.cpp'])
  else:
    sources.extend([
        'android/bionic/libc/bionic/memchr.c',
        'android/bionic/libc/bionic/memrchr.c',
        'android/bionic/libc/bionic/memmove.c',
        'android/bionic/libc/bionic/strnlen.c',
        'android/bionic/libc/string/bcopy.c',
        'android/bionic/libc/string/index.c',
        'android/bionic/libc/string/strncmp.c',
        'android/bionic/libc/string/strrchr.c',
        'android/bionic/libc/upstream-freebsd/lib/libc/string/wcschr.c',
        'android/bionic/libc/upstream-freebsd/lib/libc/string/wcsrchr.c',
        'android/bionic/libc/upstream-freebsd/lib/libc/string/wcscmp.c',
        'android/bionic/libc/upstream-freebsd/lib/libc/string/wcslen.c'])

  if OPTIONS.is_arm():
    _filter_libc_common_for_arm(vars, sources)
  elif OPTIONS.is_i686():
    _filter_libc_common_for_i686(vars, sources)
  elif OPTIONS.is_x86_64():
    _filter_libc_common_for_x86_64(vars, sources)

  # NaCl does not have fork so we do not need the fork wrapper
  # which does preparation before we actually run fork system call.
  sources.remove('android/bionic/libc/bionic/fork.c')
  # lseek64 in this file splits off64_t into two integer values to
  # make assembly code easier. We can define lseek64 in C so we do
  # not need this wrapper.
  sources.remove('android/bionic/libc/bionic/lseek64.c')
  if OPTIONS.is_x86_64() or OPTIONS.is_bare_metal_i686():
    # We define __get_tls in nacl_read_tp.c.
#.........这里部分代码省略.........
开发者ID:NaiveTorch,项目名称:ARC,代码行数:103,代码来源:config.py

示例15: _validate_mode_settings

# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_nacl_build [as 别名]
def _validate_mode_settings(parser, args):
  if args.mode == 'driveby':
    if not OPTIONS.is_nacl_build():
      parser.error('driveby mode works only with NaCl build')
开发者ID:NaiveTorch,项目名称:ARC,代码行数:6,代码来源:launch_chrome_options.py


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