Bug 1216721 - Only get the symbolizer path for ASan for ASan builds. r=chmanchester

This commit is contained in:
Andrew McCreight 2015-10-22 09:33:43 -07:00
parent ddb2ef3b9d
commit 7ab304f726

View File

@ -121,13 +121,14 @@ class CPPUnitTests(object):
else:
env[pathvar] = libpath
# Use llvm-symbolizer for ASan if available/required
llvmsym = os.path.join(self.xre_path, "llvm-symbolizer")
if os.path.isfile(llvmsym):
env["ASAN_SYMBOLIZER_PATH"] = llvmsym
self.log.info("ASan using symbolizer at %s" % llvmsym)
else:
self.log.info("Failed to find ASan symbolizer at %s" % llvmsym)
if mozinfo.info["asan"]:
# Use llvm-symbolizer for ASan if available/required
llvmsym = os.path.join(self.xre_path, "llvm-symbolizer")
if os.path.isfile(llvmsym):
env["ASAN_SYMBOLIZER_PATH"] = llvmsym
self.log.info("ASan using symbolizer at %s" % llvmsym)
else:
self.log.info("Failed to find ASan symbolizer at %s" % llvmsym)
return env