def GetEnvironmentVariables(self): if not hasattr(self, 'host_compiler_environment'): self.host_compiler_environment = build.GetHostCompilerEnvironment( clang_specification.GetClangSpecification(), self.build_accelerator) toolchain = os.path.realpath( os.path.join( self.raspi_home, 'tools/arm-bcm2708/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf' )) toolchain_bin_dir = os.path.join(toolchain, 'bin') env_variables = self.host_compiler_environment env_variables.update({ 'CC': self.build_accelerator + ' ' + os.path.join(toolchain_bin_dir, 'arm-linux-gnueabihf-gcc'), 'CXX': self.build_accelerator + ' ' + os.path.join(toolchain_bin_dir, 'arm-linux-gnueabihf-g++'), 'STRIP': os.path.join(toolchain_bin_dir, 'arm-linux-gnueabihf-strip'), }) return env_variables
def GetEnvironmentVariables(self): if not hasattr(self, 'host_compiler_environment'): self.host_compiler_environment = build.GetHostCompilerEnvironment( clang.GetClangSpecification(), self.goma_supports_compiler) env_variables = self.host_compiler_environment env_variables.update({ 'CC': self.host_compiler_environment['CC_host'], 'CXX': self.host_compiler_environment['CXX_host'], }) return env_variables
def GetEnvironmentVariables(self): env_variables = build.GetHostCompilerEnvironment( clang.GetClangSpecification(), False) toolchain = os.path.realpath( os.path.join( self.raspi_home, 'tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64')) toolchain_bin_dir = os.path.join(toolchain, 'bin') env_variables.update({ 'CC': os.path.join(toolchain_bin_dir, 'arm-linux-gnueabihf-gcc'), 'CXX': os.path.join(toolchain_bin_dir, 'arm-linux-gnueabihf-g++'), }) return env_variables
def GetEnvironmentVariables(self): self.ci20_home = self._GetCi20Home() if not hasattr(self, 'host_compiler_environment'): self.host_compiler_environment = build.GetHostCompilerEnvironment( clang.GetClangSpecification(), False) env_variables = self.host_compiler_environment env_variables = { 'CC': self.host_compiler_environment['CC_host'], 'CXX': self.host_compiler_environment['CXX_host'], 'CC_host': 'gcc', 'CXX_host': 'g++', 'LD_host': 'g++', 'ARFLAGS_host': 'rcs', 'ARTHINFLAGS_host': 'rcsT', } return env_variables
def GetHostToolchain(self): if not self._host_toolchain: if not hasattr(self, 'host_compiler_environment'): self.host_compiler_environment = build.GetHostCompilerEnvironment( clang_build.GetClangSpecification(), False) cc_path = self.host_compiler_environment['CC_host'], cxx_path = self.host_compiler_environment['CXX_host'] self._host_toolchain = [ clang.CCompiler(path=cc_path), clang.CxxCompiler(path=cxx_path), clang.AssemblerWithCPreprocessor(path=cc_path), ar.StaticThinLinker(), ar.StaticLinker(), clangxx.ExecutableLinker(path=cxx_path), clangxx.SharedLibraryLinker(path=cxx_path), cp.Copy(), touch.Stamp(), bash.Shell(), ] return self._host_toolchain
def main(): print build.EnsureClangAvailable(clang.GetClangSpecification())
""" import _env # pylint: disable=unused-import import argparse import os import re import subprocess import sys from starboard.build import clang from starboard.tools import build _SYMBOLIZER = os.path.join( build.GetToolchainsDir(), 'x86_64-linux-gnu-clang-chromium-{}'.format( clang.GetClangSpecification().revision), 'bin', 'llvm-symbolizer') _RE_ASAN = re.compile( r'\s*(#[0-9]{1,3})\s*(0x[a-z0-9]*)\s*\(<unknown\smodule>\)') _RE_COBALT = re.compile(r'\s*<unknown> \[(0x[a-z0-9]*)\]\s*') _RE_RAW = re.compile(r'^(0x[a-z0-9]*)$') def _Symbolize(filename, library, base_address): """Attempts to resolve memory addresses within the file specified. This function iterates through the file specified line by line. When a line is found that matches one of our regular expressions it will stop and invoke llvm-symbolizer with the offset of the symbol and the library specified. The results are verified and the output formatted to match whichever crash-style is being used.
def GetHostCompilerEnvironment(goma_supports_compiler=False): # Assume the same clang that Starboard declares. return build.GetHostCompilerEnvironment(clang.GetClangSpecification(), goma_supports_compiler)