[tsan] Add environment variable TSAN_SYMBOLIZER_PATH as we do in other sanitizers

ASan, LSan, MSan and UBSan all allow to use environment variable `*SAN_SYMBOLIZER_PATH` to pass the symbolizer path, this patch add `TSAN_SYMBOLIZER_PATH` to TSan.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D108911
This commit is contained in:
Xu Mingjie 2021-08-31 10:15:57 +08:00 committed by wangliushuai
parent 86c8f395ae
commit f10d003b0c
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ void InitializeFlags(Flags *f, const char *env, const char *env_option_name) {
// Override some common flags defaults.
CommonFlags cf;
cf.CopyFrom(*common_flags());
cf.external_symbolizer_path = GetEnv("TSAN_SYMBOLIZER_PATH");
cf.allow_addr2line = true;
if (SANITIZER_GO) {
// Does not work as expected for Go: runtime handles SIGABRT and crashes.