Commit a6c2ffd7 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[Supersize] Add strict check for missing tool-prefix.

When Supersize assigns tool-prefix by default, but fails to find
the tools needed, previously it quietly falls back to using other
tools. This CL changes makes this a hard failure instead. For
LLVM, also prints instruction on how to download the required
tools, now that download_objdump.py is ready.

Bug: 723798
Change-Id: Icc7e02deca9800dc7fbf30fbe6314a98c019be25
Reviewed-on: https://chromium-review.googlesource.com/794104
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519865}
parent 280c46f3
......@@ -108,9 +108,11 @@ class ToolPrefixFinder(_PathFinder):
if os.path.isfile(ret + _SAMPLE_TOOL_SUFFIX):
return ret
else:
logging.warn('Invalid default tool-prefix: %s', ret)
# TODO(huangs): For LLD, print more instruction on how to download
# or build the required tools.
err_lines = ['tool-prefix not found: %s' % ret]
if ret.endswith('llvm-'):
err_lines.append('Probably need to run: '
'tools/clang/scripts/download_objdump.py')
raise Exception('\n'.join(err_lines))
from_path = distutils.spawn.find_executable(_SAMPLE_TOOL_SUFFIX)
if from_path:
return from_path[:-7]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment