[ASan] Make asan_symbolize.py fall back to ASAN_SYMBOLIZER_PATH (which is used when ASAN_OPTIONS=symbolize=1) if LLVM_SYMBOLIZER_PATH is empty.

llvm-svn: 193758
This commit is contained in:
Alexander Potapenko 2013-10-31 16:08:09 +00:00
parent fe194d5a84
commit d29853564d
1 changed files with 4 additions and 2 deletions

View File

@ -101,8 +101,10 @@ class LLVMSymbolizer(Symbolizer):
def LLVMSymbolizerFactory(system):
symbolizer_path = os.getenv('LLVM_SYMBOLIZER_PATH')
if not symbolizer_path:
# Assume llvm-symbolizer is in PATH.
symbolizer_path = 'llvm-symbolizer'
symbolizer_path = os.getenv('ASAN_SYMBOLIZER_PATH')
if not symbolizer_path:
# Assume llvm-symbolizer is in PATH.
symbolizer_path = 'llvm-symbolizer'
return LLVMSymbolizer(symbolizer_path)