forked from chipsalliance/verible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request chipsalliance#2307 from hzeller/feature-20241222-o…
…nly-absl-patch-win Only switch to absl::string_view implementation on Windows.
Showing
1 changed file
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
// |