From dad46e1e90fd1490b5a7e07e2e3896a7b9a7dbf9 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 26 Jul 2023 15:18:20 -0700 Subject: [PATCH] Update glog to 0.6 PiperOrigin-RevId: 551330044 --- WORKSPACE | 14 +++--- ...56132ae.diff => com_github_glog_glog.diff} | 17 ++----- ...f2e1bd040fd15016af53598db0cb9b16a6655.diff | 45 ------------------- 3 files changed, 10 insertions(+), 66 deletions(-) rename third_party/{com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff => com_github_glog_glog.diff} (78%) delete mode 100644 third_party/com_github_glog_glog_f2cf2e1bd040fd15016af53598db0cb9b16a6655.diff diff --git a/WORKSPACE b/WORKSPACE index 25033fab0..a1ec2ab52 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -157,22 +157,22 @@ http_archive( # 2020-08-21 http_archive( name = "com_github_glog_glog", - strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6", - sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab", + strip_prefix = "glog-0.6.0", + sha256 = "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6", urls = [ - "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip", + "https://github.com/google/glog/archive/v0.6.0.tar.gz", ], ) http_archive( name = "com_github_glog_glog_no_gflags", - strip_prefix = "glog-0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6", - sha256 = "58c9b3b6aaa4dd8b836c0fd8f65d0f941441fb95e27212c5eeb9979cfd3592ab", + strip_prefix = "glog-0.6.0", + sha256 = "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6", build_file = "@//third_party:glog_no_gflags.BUILD", urls = [ - "https://github.com/google/glog/archive/0a2e5931bd5ff22fd3bf8999eb8ce776f159cda6.zip", + "https://github.com/google/glog/archive/v0.6.0.tar.gz", ], patches = [ - "@//third_party:com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff", + "@//third_party:com_github_glog_glog.diff", ], patch_args = [ "-p1", diff --git a/third_party/com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff b/third_party/com_github_glog_glog.diff similarity index 78% rename from third_party/com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff rename to third_party/com_github_glog_glog.diff index 471cf2aa6..bf08045b3 100644 --- a/third_party/com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff +++ b/third_party/com_github_glog_glog.diff @@ -1,19 +1,8 @@ diff --git a/src/logging.cc b/src/logging.cc -index 0b5e6ee..be5a506 100644 +index 4028ccc..483e639 100644 --- a/src/logging.cc +++ b/src/logging.cc -@@ -67,6 +67,10 @@ - # include "stacktrace.h" - #endif - -+#ifdef __ANDROID__ -+#include -+#endif -+ - using std::string; - using std::vector; - using std::setw; -@@ -1279,6 +1283,23 @@ ostream& LogMessage::stream() { +@@ -1743,6 +1743,23 @@ ostream& LogMessage::stream() { return data_->stream_; } @@ -37,7 +26,7 @@ index 0b5e6ee..be5a506 100644 // Flush buffered message, called by the destructor, or any other function // that needs to synchronize the log. void LogMessage::Flush() { -@@ -1313,6 +1334,12 @@ void LogMessage::Flush() { +@@ -1779,6 +1796,12 @@ void LogMessage::Flush() { } LogDestination::WaitForSinks(data_); diff --git a/third_party/com_github_glog_glog_f2cf2e1bd040fd15016af53598db0cb9b16a6655.diff b/third_party/com_github_glog_glog_f2cf2e1bd040fd15016af53598db0cb9b16a6655.diff deleted file mode 100644 index 560e83ecc..000000000 --- a/third_party/com_github_glog_glog_f2cf2e1bd040fd15016af53598db0cb9b16a6655.diff +++ /dev/null @@ -1,45 +0,0 @@ -https://github.com/google/glog/pull/342 - -diff --git a/CONTRIBUTORS b/CONTRIBUTORS -index d63f62d1..aa0dd4a8 100644 ---- a/CONTRIBUTORS -+++ b/CONTRIBUTORS -@@ -26,6 +26,7 @@ Abhishek Dasgupta - Abhishek Parmar - Andrew Schwartzmeyer - Andy Ying -+Bret McKee - Brian Silverman - Fumitoshi Ukai - Guillaume Dumont -diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in -index 9968b96d..f6dccb29 100644 ---- a/src/glog/logging.h.in -+++ b/src/glog/logging.h.in -@@ -649,6 +649,10 @@ void MakeCheckOpValueString(std::ostream* os, const signed char& v); - template <> GOOGLE_GLOG_DLL_DECL - void MakeCheckOpValueString(std::ostream* os, const unsigned char& v); - -+// Provide printable value for nullptr_t -+template <> GOOGLE_GLOG_DLL_DECL -+void MakeCheckOpValueString(std::ostream* os, const std::nullptr_t& v); -+ - // Build the error message string. Specify no inlining for code size. - template - std::string* MakeCheckOpString(const T1& v1, const T2& v2, const char* exprtext) -diff --git a/src/logging.cc b/src/logging.cc -index 0c86cf62..256655e5 100644 ---- a/src/logging.cc -+++ b/src/logging.cc -@@ -2163,6 +2163,11 @@ void MakeCheckOpValueString(std::ostream* os, const unsigned char& v) { - } - } - -+template <> -+void MakeCheckOpValueString(std::ostream* os, const std::nullptr_t& v) { -+ (*os) << "nullptr"; -+} -+ - void InitGoogleLogging(const char* argv0) { - glog_internal_namespace_::InitGoogleLoggingUtilities(argv0); - }