symbolizer-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 2 Sep 2020 11:55:46 +0000 (12:55 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 2 Sep 2020 11:55:46 +0000 (12:55 +0100)
===================================================================

Gbp-Pq: Name symbolizer-path.diff

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp

index c123ecb11206cca14d1b78683e40aa45edc8d201..07bf75922c90a65c7ca911c635de117811c5c287 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>
@@ -428,7 +432,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);
   }