コード例 #1
0
def _FindZipAlign():
    # SDK does not exist on presubmit CQ bot.
    candidates = glob.glob(
        path_util.FromToolsSrcRootRelative(
            'third_party/android_sdk/public/build-tools/*/zipalign'))
    # Any version will do.
    return candidates[0] if candidates else None
コード例 #2
0
    def _ToolPrefixForSymbol(self, size_info):
        tool_prefix = self._tool_prefix_finder.Tentative()
        orig_tool_prefix = size_info.metadata.get(models.METADATA_TOOL_PREFIX)
        if orig_tool_prefix:
            orig_tool_prefix = path_util.FromToolsSrcRootRelative(
                orig_tool_prefix)
            if os.path.exists(path_util.GetObjDumpPath(orig_tool_prefix)):
                tool_prefix = orig_tool_prefix

        # TODO(agrieve): Would be even better to use objdump --info to check that
        #     the toolchain is for the correct architecture.
        assert tool_prefix is not None, (
            'Could not determine --tool-prefix. Possible fixes include setting '
            '--tool-prefix, or setting --output-directory')
        return tool_prefix