Skip to content

Commit

Permalink
Update glog to latest commit
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 567337708
  • Loading branch information
MediaPipe Team authored and copybara-github committed Sep 21, 2023
1 parent 19c9d32 commit 82d83f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 33 deletions.
12 changes: 6 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,19 @@ http_archive(
# 2020-08-21
http_archive(
name = "com_github_glog_glog",
strip_prefix = "glog-3a0d4d22c5ae0b9a2216988411cfa6bf860cc372",
sha256 = "170d08f80210b82d95563f4723a15095eff1aad1863000e8eeb569c96a98fefb",
strip_prefix = "glog-0.6.0",
sha256 = "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6",
urls = [
"https://github.com/google/glog/archive/3a0d4d22c5ae0b9a2216988411cfa6bf860cc372.zip",
"https://github.com/google/glog/archive/v0.6.0.tar.gz",
],
)
http_archive(
name = "com_github_glog_glog_no_gflags",
strip_prefix = "glog-3a0d4d22c5ae0b9a2216988411cfa6bf860cc372",
sha256 = "170d08f80210b82d95563f4723a15095eff1aad1863000e8eeb569c96a98fefb",
strip_prefix = "glog-0.6.0",
sha256 = "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6",
build_file = "@//third_party:glog_no_gflags.BUILD",
urls = [
"https://github.com/google/glog/archive/3a0d4d22c5ae0b9a2216988411cfa6bf860cc372.zip",
"https://github.com/google/glog/archive/v0.6.0.tar.gz",
],
patches = [
"@//third_party:com_github_glog_glog.diff",
Expand Down
27 changes: 0 additions & 27 deletions third_party/com_github_glog_glog.diff
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,3 @@ index 4028ccc..483e639 100644
if (append_newline) {
// Fix the ostrstream back how it was before we screwed with it.
// It's 99.44% certain that we don't need to worry about doing this.

diff --git a/bazel/glog.bzl b/bazel/glog.bzl
index dacd934..d7b3d78 100644
--- a/bazel/glog.bzl
+++ b/bazel/glog.bzl
@@ -53,7 +53,6 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
)

common_copts = [
- "-std=c++14",
"-DGLOG_BAZEL_BUILD",
# Inject a C++ namespace.
"-DGOOGLE_NAMESPACE='%s'" % namespace,
@@ -145,7 +144,13 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
],
})

+ c14_opts = ["-std=c++14"]
+ c17_opts = ["-std=c++17"]
+
final_lib_copts = select({
+ "@bazel_tools//src/conditions:windows": c17_opts,
+ "//conditions:default": c14_opts,
+ }) + select({
"@bazel_tools//src/conditions:windows": common_copts + windows_only_copts,
"@bazel_tools//src/conditions:darwin": common_copts + linux_or_darwin_copts + darwin_only_copts,
"@bazel_tools//src/conditions:freebsd": common_copts + linux_or_darwin_copts + freebsd_only_copts,

0 comments on commit 82d83f2

Please sign in to comment.