summaryrefslogtreecommitdiff
path: root/absl/debugging/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'absl/debugging/BUILD.bazel')
-rw-r--r--absl/debugging/BUILD.bazel47
1 files changed, 26 insertions, 21 deletions
diff --git a/absl/debugging/BUILD.bazel b/absl/debugging/BUILD.bazel
index a8ebaea4..913cfafb 100644
--- a/absl/debugging/BUILD.bazel
+++ b/absl/debugging/BUILD.bazel
@@ -5,7 +5,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,8 +15,9 @@
#
load(
- "//absl:copts.bzl",
+ "//absl:copts/configure_copts.bzl",
"ABSL_DEFAULT_COPTS",
+ "ABSL_DEFAULT_LINKOPTS",
"ABSL_TEST_COPTS",
)
@@ -33,6 +34,7 @@ cc_library(
],
hdrs = ["stacktrace.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":debugging_internal",
"//absl/base",
@@ -53,11 +55,13 @@ cc_library(
"symbolize.h",
],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":debugging_internal",
":demangle_internal",
"//absl/base",
"//absl/base:core_headers",
+ "//absl/base:dynamic_annotations",
"//absl/base:malloc_internal",
],
)
@@ -66,6 +70,7 @@ cc_test(
name = "symbolize_test",
srcs = ["symbolize_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":stack_consumption",
":symbolize",
@@ -85,6 +90,7 @@ cc_library(
"internal/examine_stack.h",
],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
deps = [
":stacktrace",
@@ -99,6 +105,7 @@ cc_library(
srcs = ["failure_signal_handler.cc"],
hdrs = ["failure_signal_handler.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":examine_stack",
":stacktrace",
@@ -115,7 +122,7 @@ cc_test(
linkopts = select({
"//absl:windows": [],
"//conditions:default": ["-pthread"],
- }),
+ }) + ABSL_DEFAULT_LINKOPTS,
deps = [
":failure_signal_handler",
":stacktrace",
@@ -147,6 +154,7 @@ cc_library(
"internal/vdso_support.h",
],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/base",
"//absl/base:core_headers",
@@ -169,6 +177,7 @@ cc_test(
name = "demangle_test",
srcs = ["internal/demangle_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":demangle_internal",
":stack_consumption",
@@ -181,22 +190,9 @@ cc_test(
cc_library(
name = "leak_check",
- srcs = select({
- # The leak checking interface depends on weak function
- # declarations that may not necessarily have definitions.
- # Windows doesn't support this, and ios requires
- # guaranteed definitions for weak symbols.
- "//absl:ios": [],
- "//absl:windows": [],
- "//conditions:default": [
- "leak_check.cc",
- ],
- }),
- hdrs = select({
- "//absl:ios": [],
- "//absl:windows": [],
- "//conditions:default": ["leak_check.h"],
- }),
+ srcs = ["leak_check.cc"],
+ hdrs = ["leak_check.h"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = ["//absl/base:core_headers"],
)
@@ -206,6 +202,7 @@ cc_library(
cc_library(
name = "leak_check_disable",
srcs = ["leak_check_disable.cc"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
linkstatic = 1,
alwayslink = 1,
)
@@ -226,6 +223,7 @@ cc_library(
"//absl:llvm_compiler": ["-DLEAK_SANITIZER"],
"//conditions:default": [],
}),
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
)
@@ -235,6 +233,7 @@ cc_library(
srcs = ["leak_check.cc"],
hdrs = ["leak_check.h"],
copts = ["-ULEAK_SANITIZER"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
)
@@ -245,7 +244,8 @@ cc_test(
"//absl:llvm_compiler": ["-DABSL_EXPECT_LEAK_SANITIZER"],
"//conditions:default": [],
}),
- linkopts = ABSL_LSAN_LINKOPTS,
+ linkopts = ABSL_LSAN_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
+ tags = ["notsan"],
deps = [
":leak_check_api_enabled_for_testing",
"//absl/base",
@@ -257,6 +257,8 @@ cc_test(
name = "leak_check_no_lsan_test",
srcs = ["leak_check_test.cc"],
copts = ["-UABSL_EXPECT_LEAK_SANITIZER"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ tags = ["noasan"],
deps = [
":leak_check_api_disabled_for_testing",
"//absl/base", # for raw_logging
@@ -271,7 +273,8 @@ cc_test(
cc_test(
name = "disabled_leak_check_test",
srcs = ["leak_check_fail_test.cc"],
- linkopts = ABSL_LSAN_LINKOPTS,
+ linkopts = ABSL_LSAN_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
+ tags = ["notsan"],
deps = [
":leak_check_api_enabled_for_testing",
":leak_check_disable",
@@ -286,6 +289,7 @@ cc_library(
srcs = ["internal/stack_consumption.cc"],
hdrs = ["internal/stack_consumption.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
deps = [
"//absl/base",
@@ -297,6 +301,7 @@ cc_test(
name = "stack_consumption_test",
srcs = ["internal/stack_consumption_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":stack_consumption",
"//absl/base",