about summary refs log tree commit diff
path: root/absl/debugging
diff options
context:
space:
mode:
Diffstat (limited to 'absl/debugging')
-rw-r--r--absl/debugging/CMakeLists.txt12
-rw-r--r--absl/debugging/internal/demangle_test.cc5
-rw-r--r--absl/debugging/symbolize_win32.inc6
3 files changed, 21 insertions, 2 deletions
diff --git a/absl/debugging/CMakeLists.txt b/absl/debugging/CMakeLists.txt
index dccd4a562bf0..d813fede60e0 100644
--- a/absl/debugging/CMakeLists.txt
+++ b/absl/debugging/CMakeLists.txt
@@ -43,6 +43,8 @@ absl_cc_library(
     "symbolize_win32.inc"
   COPTS
     ${ABSL_DEFAULT_COPTS}
+  LINKOPTS
+    ${ABSL_DEFAULT_LINKOPTS}
   DEPS
     absl::debugging_internal
     absl::demangle_internal
@@ -196,6 +198,8 @@ absl_cc_library(
     leak_check_disable
   SRCS
     "leak_check_disable.cc"
+  COPTS
+    ${ABSL_DEFAULT_COPTS}
   PUBLIC
 )
 
@@ -207,6 +211,7 @@ absl_cc_library(
   SRCS
     "leak_check.cc"
   COPTS
+    ${ABSL_DEFAULT_COPTS}
     $<$<BOOL:${ABSL_HAVE_LSAN}>:-DLEAK_SANITIZER>
   TESTONLY
 )
@@ -219,6 +224,7 @@ absl_cc_library(
   SRCS
     "leak_check.cc"
   COPTS
+    ${ABSL_DEFAULT_COPTS}
     "-ULEAK_SANITIZER"
   TESTONLY
 )
@@ -229,6 +235,7 @@ absl_cc_test(
   SRCS
     "leak_check_test.cc"
   COPTS
+    ${ABSL_DEFAULT_COPTS}
     "$<$<BOOL:${ABSL_HAVE_LSAN}>:-DABSL_EXPECT_LEAK_SANITIZER>"
   LINKOPTS
     "${ABSL_LSAN_LINKOPTS}"
@@ -244,6 +251,7 @@ absl_cc_test(
   SRCS
     "leak_check_test.cc"
   COPTS
+    ${ABSL_TEST_COPTS}
     "-UABSL_EXPECT_LEAK_SANITIZER"
   DEPS
     absl::leak_check_api_disabled_for_testing
@@ -256,6 +264,8 @@ absl_cc_test(
     disabled_leak_check_test
   SRCS
     "leak_check_fail_test.cc"
+  COPTS
+    ${ABSL_TEST_COPTS}
   LINKOPTS
     "${ABSL_LSAN_LINKOPTS}"
   DEPS
@@ -298,6 +308,8 @@ absl_cc_test(
 absl_cc_library(
   NAME
     debugging
+  COPTS
+    ${ABSL_DEFAULT_COPTS}
   DEPS
     absl::stacktrace
     absl::leak_check
diff --git a/absl/debugging/internal/demangle_test.cc b/absl/debugging/internal/demangle_test.cc
index 883b92db7757..a68ce3249bcb 100644
--- a/absl/debugging/internal/demangle_test.cc
+++ b/absl/debugging/internal/demangle_test.cc
@@ -81,8 +81,9 @@ TEST(Demangle, Clones) {
 // Tests that verify that Demangle footprint is within some limit.
 // They are not to be run under sanitizers as the sanitizers increase
 // stack consumption by about 4x.
-#if defined(ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION) && \
-    !ADDRESS_SANITIZER && !MEMORY_SANITIZER && !THREAD_SANITIZER
+#if defined(ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION) &&   \
+    !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
+    !defined(THREAD_SANITIZER)
 
 static const char *g_mangled;
 static char g_demangle_buffer[4096];
diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc
index 17ea618a77de..7ed3bd3a1b06 100644
--- a/absl/debugging/symbolize_win32.inc
+++ b/absl/debugging/symbolize_win32.inc
@@ -16,7 +16,13 @@
 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms680578(v=vs.85).aspx
 
 #include <windows.h>
+
+// MSVC header DbgHelp.h has a warning for an ignored typedef.
+#pragma warning(push)
+#pragma warning(disable:4091)
 #include <DbgHelp.h>
+#pragma warning(pop)
+
 #pragma comment(lib, "DbgHelp")
 
 #include <algorithm>