From: LLVM Packaging Team Date: Wed, 30 Oct 2024 20:56:13 +0000 (+0100) Subject: symbolizer-path X-Git-Tag: archive/raspbian/1%19.1.3-1+rpi1~83 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e1b0cb8352eb6901fca86fb2c543f10c73c47d40;p=llvm-toolchain-19.git symbolizer-path =================================================================== Gbp-Pq: Name symbolizer-path.diff --- diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt index 66f2d259aa..21e451ca96 100644 --- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt @@ -211,6 +211,7 @@ set(SANITIZER_IMPL_HEADERS ) include_directories(..) +include_directories(${LLVM_INCLUDE_DIR}) set(SANITIZER_COMMON_DEFINITIONS HAVE_RPC_XDR_H=${HAVE_RPC_XDR_H}) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp index 0ddc24802d..0cc9f2668e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp @@ -34,6 +34,11 @@ # 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) + // C++ demangling function, as required by Itanium C++ ABI. This is weak, // because we do not require a C++ ABI library to be linked to a program // using sanitizers; if it's not present, we'll just use the mangled name. @@ -450,7 +455,7 @@ static SymbolizerTool *ChooseExternalSymbolizer(LowLevelAllocator *allocator) { return new(*allocator) AtosSymbolizer(found_path, allocator); } #endif // SANITIZER_APPLE - 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); }