mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-14 13:28:35 +00:00
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
Index: llvm-toolchain-12_12.0.1/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
|
|
===================================================================
|
|
--- llvm-toolchain-12_12.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
|
|
+++ llvm-toolchain-12_12.0.1/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
|
|
@@ -25,6 +25,10 @@
|
|
#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 *ChooseExternalSym
|
|
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);
|
|
}
|
|
Index: llvm-toolchain-12_12.0.1/compiler-rt/lib/sanitizer_common/CMakeLists.txt
|
|
===================================================================
|
|
--- llvm-toolchain-12_12.0.1.orig/compiler-rt/lib/sanitizer_common/CMakeLists.txt
|
|
+++ llvm-toolchain-12_12.0.1/compiler-rt/lib/sanitizer_common/CMakeLists.txt
|
|
@@ -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})
|