Skip to content

Commit 106d6c4

Browse files
committed
patch Abseil to be like Envoy's
1 parent b17aca2 commit 106d6c4

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

WORKSPACE

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
# Abseil's absl::string_view and absl::optional instead.
55
#
66
# In the context of an Envoy build, the Abseil libraries point to whatever
7-
# versions Envoy uses.
7+
# versions Envoy uses, inlcuding some source patches.
88
#
99
# To test this library's Bazel build independent of Envoy, we need to specify
10-
# versions of the Abseil libraries. That is what this file is for.
10+
# versions of the Abseil libraries, including Envoy's patches. That is what this
11+
# file is for.
1112

1213
# These rules are based on <https://abseil.io/docs/cpp/quickstart>,
1314
# accessed December 6, 2022.
@@ -18,6 +19,8 @@ http_archive(
1819
urls = ["https://github.com/abseil/abseil-cpp/archive/98eb410c93ad059f9bba1bf43f5bb916fc92a5ea.zip"],
1920
sha256 = "aabf6c57e3834f8dc3873a927f37eaf69975d4b28117fc7427dfb1c661542a87",
2021
strip_prefix = "abseil-cpp-98eb410c93ad059f9bba1bf43f5bb916fc92a5ea",
22+
patches = ["//:abseil.patch"],
23+
patch_args = ["-p1"],
2124
)
2225

2326
http_archive(

abseil.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/absl/base/options.h b/absl/base/options.h
2+
index 6868c77b..a6577ed0 100644
3+
--- a/absl/base/options.h
4+
+++ b/absl/base/options.h
5+
@@ -135,7 +135,7 @@
6+
// absl::optional is a typedef of std::optional, use the feature macro
7+
// ABSL_USES_STD_OPTIONAL.
8+
9+
-#define ABSL_OPTION_USE_STD_OPTIONAL 2
10+
+#define ABSL_OPTION_USE_STD_OPTIONAL 0
11+
12+
13+
// ABSL_OPTION_USE_STD_STRING_VIEW
14+
@@ -162,7 +162,7 @@
15+
// absl::string_view is a typedef of std::string_view, use the feature macro
16+
// ABSL_USES_STD_STRING_VIEW.
17+
18+
-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
19+
+#define ABSL_OPTION_USE_STD_STRING_VIEW 0
20+
21+
// ABSL_OPTION_USE_STD_VARIANT
22+
//

0 commit comments

Comments
 (0)