def GetPathList(self, show_warning=True): """Get a list of available toolchain paths Args: show_warning: True to show a warning if there are no tool chains. Returns: List of strings, each a path to a toolchain mentioned in the [toolchain] section of the settings file. """ toolchains = bsettings.GetItems('toolchain') if show_warning and not toolchains: print ("Warning: No tool chains. Please run 'buildman " "--fetch-arch all' to download all available toolchains, or " "add a [toolchain] section to your buildman config file " "%s. See README for details" % bsettings.config_fname) paths = [] for name, value in toolchains: if '*' in value: paths += glob.glob(value) else: paths.append(value) return paths
def __init__(self): self.toolchains = {} self.paths = [] toolchains = bsettings.GetItems('toolchain') if not toolchains: print( "Warning: No tool chains - please add a [toolchain] section" " to your buildman config file %s. See README for details" % config_fname) for name, value in toolchains: if '*' in value: self.paths += glob.glob(value) else: self.paths.append(value) self._make_flags = dict(bsettings.GetItems('make-flags'))
def GetSettings(self, show_warning=True): """Get toolchain settings from the settings file. Args: show_warning: True to show a warning if there are no tool chains. """ self.prefixes = bsettings.GetItems('toolchain-prefix') self.paths += self.GetPathList(show_warning)
def __init__(self): self.toolchains = {} self.paths = [] for name, value in bsettings.GetItems('toolchain'): if '*' in value: self.paths += glob.glob(value) else: self.paths.append(value)
def GetWrapper(self, show_warning=True): """Get toolchain wrapper from the setting file. """ value = '' for name, value in bsettings.GetItems('toolchain-wrapper'): if not value: print("Warning: Wrapper not found") if value: value = value + ' ' return value
def GetSettings(self): toolchains = bsettings.GetItems('toolchain') if not toolchains: print( "Warning: No tool chains - please add a [toolchain] section" " to your buildman config file %s. See README for details" % bsettings.config_fname) for name, value in toolchains: if '*' in value: self.paths += glob.glob(value) else: self.paths.append(value)
def Select(self, arch): """Returns the toolchain for a given architecture Args: args: Name of architecture (e.g. 'arm', 'ppc_8xx') returns: toolchain object, or None if none found """ for name, value in bsettings.GetItems('toolchain-alias'): if arch == name: arch = value if not arch in self.toolchains: raise ValueError, ("No tool chain found for arch '%s'" % arch) return self.toolchains[arch]
def GetPathList(self): """Get a list of available toolchain paths Returns: List of strings, each a path to a toolchain mentioned in the [toolchain] section of the settings file. """ toolchains = bsettings.GetItems('toolchain') if not toolchains: print ("Warning: No tool chains - please add a [toolchain] section" " to your buildman config file %s. See README for details" % bsettings.config_fname) paths = [] for name, value in toolchains: if '*' in value: paths += glob.glob(value) else: paths.append(value) return paths
def __init__(self, override_toolchain=None): self.toolchains = {} self.prefixes = {} self.paths = [] self.override_toolchain = override_toolchain self._make_flags = dict(bsettings.GetItems('make-flags'))
def __init__(self): self.toolchains = {} self.paths = [] self._make_flags = dict(bsettings.GetItems('make-flags'))
def GetSettings(self): self.prefixes = bsettings.GetItems('toolchain-prefix') self.paths += self.GetPathList()