forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
io_opentracing_cpp.patch
39 lines (37 loc) · 1.63 KB
/
io_opentracing_cpp.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/src/dynamic_load_unix.cpp b/src/dynamic_load_unix.cpp
index 17e08fd..d25e0c8 100644
--- a/src/dynamic_load_unix.cpp
+++ b/src/dynamic_load_unix.cpp
@@ -35,7 +35,11 @@ DynamicallyLoadTracingLibrary(const char* shared_library,
std::string& error_message) noexcept try {
dlerror(); // Clear any existing error.
- const auto handle = dlopen(shared_library, RTLD_NOW | RTLD_LOCAL);
+ const auto handle = dlopen(shared_library, RTLD_NOW | RTLD_LOCAL
+#ifdef __SANITIZE_ADDRESS__
+ | RTLD_NODELETE
+#endif
+ );
if (handle == nullptr) {
error_message = dlerror();
return make_unexpected(dynamic_load_failure_error);
# commit 3a6f049c123a1906c7381e824292c18fd8698293
# Author: Christian Neumüller <[email protected]>
# Date: Wed Feb 27 01:48:17 2019 +0100
#
# Fix MSVC compiler flags. (#104)
#
# * All debug specific flags would be replaced by release specific on MSVC.
# * The OPENTRACING_STATIC flag would be missing from OpenTracingConfig.cmake when linking against OpenTracing::opentracing-static
#
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1721fb3..3873b3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} -D_SCL_SECURE_NO_WARNINGS")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS")
endif()
# ==============================================================================