Пример #1
0
def get_nacl_tools():
  """Returns a list of the NaCl tools that are needed to run unit tests."""
  if build_options.OPTIONS.is_bare_metal_build():
    return [toolchain.get_nonsfi_loader()]

  bitsize = build_options.OPTIONS.get_target_bitsize()
  arch = 'x86_%d' % bitsize
  nacl_tools = [toolchain.get_nacl_tool('sel_ldr_%s' % arch),
                toolchain.get_nacl_tool('irt_core_%s.nexe' % arch),
                os.path.join(toolchain.get_nacl_toolchain_libs_path(bitsize),
                             'runnable-ld.so')]
  return [os.path.relpath(nacl_tool, build_common.get_arc_root())
          for nacl_tool in nacl_tools]
Пример #2
0
import multiprocessing
import os
import re
import subprocess
import sys

from src.build import build_common
from src.build import toolchain
from src.build.build_options import OPTIONS
from src.build.util import concurrent
from src.build.util import concurrent_subprocess
from src.build.util import file_util
from src.build.util import logging_util


_MINIDUMP_DUMP_TOOL = toolchain.get_nacl_tool('minidump_dump')
_MINIDUMP_STACKWALK_TOOL = toolchain.get_nacl_tool('minidump_stackwalk')
_SYMBOL_OUT_DIR = 'out/symbols'


def _get_symbol_marker(path):
  sha1 = hashlib.sha1()
  with open(path) as f:
    sha1.update(f.read())
  return os.path.join(_SYMBOL_OUT_DIR, 'hash', sha1.hexdigest())


class _DumpSymsFilter(concurrent_subprocess.OutputHandler):
  _WARNING_RE = re.compile('|'.join([
      # TODO(crbug.com/468597): Figure out if these are benign.
      # From src/common/dwarf_cu_to_module.cc