Skip to content

Commit

Permalink
Merge pull request #2307 from hzeller/feature-20241222-only-absl-patc…
Browse files Browse the repository at this point in the history
…h-win

Only switch to absl::string_view implementation on Windows.
  • Loading branch information
hzeller authored Dec 23, 2024
2 parents 96d121b + f7aff2e commit e7d381d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions bazel/absl.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
diff -uw -r a/absl/base/options.h b/absl/base/options.h
--- a/absl/base/options.h 2021-04-02 23:00:31.996584600 -0400
+++ b/absl/base/options.h 2021-04-02 23:01:07.506208600 -0400
@@ -154,7 +154,7 @@
diff --git a/absl/base/options.h b/absl/base/options.h
index 4b70446b..6a839d94 100644
--- a/absl/base/options.h
+++ b/absl/base/options.h
@@ -148,7 +148,13 @@
// absl::string_view is a typedef of std::string_view, use the feature macro
// ABSL_USES_STD_STRING_VIEW.

-#define ABSL_OPTION_USE_STD_STRING_VIEW 2

+#ifdef _WIN32
+// On Windows, the std::string_view iterator is not const char*, which
+// is the expectation in a lot of Verible code. Use absl-impl.
+#define ABSL_OPTION_USE_STD_STRING_VIEW 0

+#else
#define ABSL_OPTION_USE_STD_STRING_VIEW 2
+#endif

// ABSL_OPTION_USE_STD_VARIANT
//

0 comments on commit e7d381d

Please sign in to comment.