symbolizer-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 28 Sep 2021 10:06:50 +0000 (11:06 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Tue, 28 Sep 2021 10:06:50 +0000 (11:06 +0100)
===================================================================

Gbp-Pq: Name symbolizer-path.diff

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp

index 3c379a8480250fbd46c11a1bed165334cb48202c..0f8a757a9a2f1e1b0397efa844b817f7e827768b 100644 (file)
 #include "sanitizer_symbolizer_internal.h"
 #include "sanitizer_symbolizer_libbacktrace.h"
 #include "sanitizer_symbolizer_mac.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_VERSION_MAJOR
+
+#define TOSTR2(X) #X
+#define TOSTR(X) TOSTR2(X)
 
 #include <dlfcn.h>   // for dlsym()
 #include <errno.h>
@@ -433,7 +437,7 @@ static SymbolizerTool *ChooseExternalSymbolizer(LowLevelAllocator *allocator) {
     return new(*allocator) AtosSymbolizer(found_path, allocator);
   }
 #endif  // SANITIZER_MAC
-  if (const char *found_path = FindPathToBinary("llvm-symbolizer")) {
+  if (const char *found_path = "/usr/bin/llvm-symbolizer-" TOSTR(LLVM_VERSION_MAJOR)) {
     VReport(2, "Using llvm-symbolizer found at: %s\n", found_path);
     return new(*allocator) LLVMSymbolizer(found_path, allocator);
   }