symbolizer-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Thu, 16 Dec 2021 16:49:22 +0000 (16:49 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Thu, 16 Dec 2021 16:49:22 +0000 (16:49 +0000)
===================================================================

Gbp-Pq: Name symbolizer-path.diff

compiler-rt/lib/sanitizer_common/CMakeLists.txt
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp

index 674835aba120447d48b1c6461ace53711832c1b6..f04d42de0d6551567bf188b48063c01c6935b644 100644 (file)
@@ -195,6 +195,7 @@ set(SANITIZER_IMPL_HEADERS
   )
 
 include_directories(..)
+include_directories(${LLVM_INCLUDE_DIR})
 
 set(SANITIZER_COMMON_DEFINITIONS
   HAVE_RPC_XDR_H=${HAVE_RPC_XDR_H})
index 4dd5cc3ad7cbed1dde3ac80dba2667bd9af05bb2..4b0b2d8ac9c5e2490d6e0e4c7e73429c367d262b 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);
   }