[compiler-rt] Add cmake option to enable/disable searching PATH for symbolizer (PR #129012)

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 16:08:02 PST 2025


================
@@ -443,23 +443,28 @@ static SymbolizerTool *ChooseExternalSymbolizer(LowLevelAllocator *allocator) {
   }
 
   // Otherwise symbolizer program is unknown, let's search $PATH
+#ifdef SANITIZER_DISABLE_SYMBOLIZER_PATH_SEARCH
+   VReport(2, "Symbolizer path search is disabled in the runtime build configuration\n");
+   return nullptr;
----------------
hubert-reinterpretcast wrote:

Nit: Wrap at 80 characters.
Nit: Indent at 2 spaces.
Nit: Use a period at the end of the sentence for consistency with https://github.com/llvm/llvm-project/blob/11ff45aab0d9e27e9fd7d35f59d3acc1256f9f60/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp#L421

```suggestion
  VReport(2, "Symbolizer path search is disabled in the runtime build "
             "configuration.\n");
  return nullptr;
```

https://github.com/llvm/llvm-project/pull/129012


More information about the llvm-commits mailing list