From d29853564d42b6dd86b6fc13351e659dade7be7c Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 31 Oct 2013 16:08:09 +0000 Subject: [PATCH] [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 --- compiler-rt/lib/asan/scripts/asan_symbolize.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/asan/scripts/asan_symbolize.py b/compiler-rt/lib/asan/scripts/asan_symbolize.py index 3571468d8775..a398fcf10361 100755 --- a/compiler-rt/lib/asan/scripts/asan_symbolize.py +++ b/compiler-rt/lib/asan/scripts/asan_symbolize.py @@ -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)