def GetHostToolchain(self, **kwargs):
    if not hasattr(self, '_host_toolchain'):
      env_variables = self.GetEnvironmentVariables()
      cc_path = env_variables['CC_host']
      cxx_path = env_variables['CXX_host']

      # Takes the provided value of CXX_HOST with a prepended 'ccache' and an
      # appended 'bin/clang++' and strips them off, leaving us with an absolute
      # path to the root directory of our toolchain.
      begin_path_index = cxx_path.find('/')
      end_path_index = cxx_path.rfind('/', 0, cxx_path.rfind('/')) + 1
      cxx_path_root = cxx_path[begin_path_index:end_path_index]

      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),
          evergreen_linker.SharedLibraryLinker(
              path=cxx_path_root, extra_flags=['-m aarch64elf']),
          cp.Copy(),
          touch.Stamp(),
          bash.Shell(),
      ]
    return self._host_toolchain
Beispiel #2
0
    def GetHostToolchain(self):
        environment_variables = self.GetEnvironmentVariables()
        cc_path = environment_variables['CC']
        cxx_path = environment_variables['CXX']

        return [
            clang.CCompiler(path=cc_path),
            clang.CxxCompiler(path=cxx_path),
            clang.AssemblerWithCPreprocessor(path=cc_path),
            ar.StaticThinLinker(),
            ar.StaticLinker(),
            clangxx.ExecutableLinker(path=cxx_path),
            cp.Copy(),
            touch.Stamp(),
            bash.Shell(),
        ]
Beispiel #3
0
    def GetHostToolchain(self, **kwargs):
        environment_variables = self.GetEnvironmentVariables()
        cc_path = environment_variables['CC_host']
        cxx_path = environment_variables['CXX_host']

        return [
            clang.CCompiler(path=cc_path),
            clang.CxxCompiler(path=cxx_path),
            clang.AssemblerWithCPreprocessor(path=cc_path),
            ar.StaticThinLinker(),
            ar.StaticLinker(),
            clangxx.ExecutableLinker(path=cxx_path, write_group=True),
            clangxx.SharedLibraryLinker(path=cxx_path),
            cp.Copy(),
            touch.Stamp(),
            bash.Shell(),
        ]
Beispiel #4
0
 def GetHostToolchain(self):
   if not self._host_toolchain:
     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
Beispiel #5
0
 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