Skip to content

Commit e7d381d

Browse files
authored
Merge pull request #2307 from hzeller/feature-20241222-only-absl-patch-win
Only switch to absl::string_view implementation on Windows.
2 parents 96d121b + f7aff2e commit e7d381d

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

bazel/absl.patch

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
diff -uw -r a/absl/base/options.h b/absl/base/options.h
2-
--- a/absl/base/options.h 2021-04-02 23:00:31.996584600 -0400
3-
+++ b/absl/base/options.h 2021-04-02 23:01:07.506208600 -0400
4-
@@ -154,7 +154,7 @@
1+
diff --git a/absl/base/options.h b/absl/base/options.h
2+
index 4b70446b..6a839d94 100644
3+
--- a/absl/base/options.h
4+
+++ b/absl/base/options.h
5+
@@ -148,7 +148,13 @@
56
// absl::string_view is a typedef of std::string_view, use the feature macro
67
// ABSL_USES_STD_STRING_VIEW.
7-
8-
-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
8+
9+
+#ifdef _WIN32
10+
+// On Windows, the std::string_view iterator is not const char*, which
11+
+// is the expectation in a lot of Verible code. Use absl-impl.
912
+#define ABSL_OPTION_USE_STD_STRING_VIEW 0
10-
13+
+#else
14+
#define ABSL_OPTION_USE_STD_STRING_VIEW 2
15+
+#endif
16+
1117
// ABSL_OPTION_USE_STD_VARIANT
1218
//

0 commit comments

Comments
 (0)