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.bazel13
1 files changed, 12 insertions, 1 deletions
diff --git a/absl/types/BUILD.bazel b/absl/types/BUILD.bazel
index f98d9af429ce..60d6a60fa881 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,
+    copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
     deps = [
         ":bad_any_cast",
         "//absl/base:config",
@@ -83,6 +83,17 @@ cc_test(
     ],
 )
 
+cc_test(
+    name = "any_exception_safety_test",
+    srcs = ["any_exception_safety_test.cc"],
+    copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
+    deps = [
+        ":any",
+        "//absl/base:exception_safety_testing",
+        "@com_google_googletest//:gtest_main",
+    ],
+)
+
 cc_library(
     name = "span",
     hdrs = ["span.h"],