Commit 8f3aad07 authored by earthdok's avatar earthdok Committed by Commit bot

Hard-code the symbolizer path in asan_symbolize.py

BUG=415179
R=glider@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/556853003

Cr-Commit-Position: refs/heads/master@{#295967}
parent 5b9cc021
......@@ -32,8 +32,22 @@ def disable_buffering():
os.environ['PYTHONUNBUFFERED'] = 'x'
def set_symbolizer_path():
"""Set the path to the llvm-symbolize binary in the Chromium source tree."""
if not os.environ.get('LLVM_SYMBOLIZER_PATH'):
script_dir = os.path.dirname(os.path.abspath(__file__))
# Assume this script resides three levels below src/ (i.e.
# src/tools/valgrind/asan/).
src_root = os.path.join(script_dir, "..", "..", "..")
symbolizer_path = os.path.join(src_root, 'third_party',
'llvm-build', 'Release+Asserts', 'bin', 'llvm-symbolizer')
assert(os.path.isfile(symbolizer_path))
os.environ['LLVM_SYMBOLIZER_PATH'] = os.path.abspath(symbolizer_path)
def main():
disable_buffering()
set_symbolizer_path()
asan_symbolize.demangle = True
asan_symbolize.fix_filename_patterns = sys.argv[1:]
asan_symbolize.logfile = sys.stdin
......
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