about summary refs log tree commit diff
path: root/absl/types/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'absl/types/BUILD.bazel')
-rw-r--r--absl/types/BUILD.bazel15
1 files changed, 12 insertions, 3 deletions
diff --git a/absl/types/BUILD.bazel b/absl/types/BUILD.bazel
index c26c68d0b35f..1fc4c098e9bd 100644
--- a/absl/types/BUILD.bazel
+++ b/absl/types/BUILD.bazel
@@ -28,7 +28,7 @@ licenses(["notice"])  # Apache 2.0
 cc_library(
     name = "any",
     hdrs = ["any.h"],
-    copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
+    copts = ABSL_DEFAULT_COPTS,
     deps = [
         ":bad_any_cast",
         "//absl/base:config",
@@ -40,9 +40,19 @@ cc_library(
 
 cc_library(
     name = "bad_any_cast",
-    srcs = ["bad_any_cast.cc"],
     hdrs = ["bad_any_cast.h"],
+    copts = ABSL_DEFAULT_COPTS,
+    deps = [":bad_any_cast_impl"],
+)
+
+cc_library(
+    name = "bad_any_cast_impl",
+    srcs = [
+        "bad_any_cast.cc",
+        "bad_any_cast.h",
+    ],
     copts = ABSL_EXCEPTIONS_FLAG + ABSL_DEFAULT_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         "//absl/base",
         "//absl/base:config",
@@ -206,7 +216,6 @@ cc_test(
     ],
 )
 
-
 cc_library(
     name = "variant",
     srcs = ["internal/variant.h"],