No public description
PiperOrigin-RevId: 568660415
This commit is contained in:
parent
0417817886
commit
3134625508
19
WORKSPACE
19
WORKSPACE
|
@ -176,6 +176,25 @@ http_archive(
|
|||
],
|
||||
)
|
||||
|
||||
# 2023-06-05
|
||||
# This version of Glog is required for Windows support, but currently causes
|
||||
# crashes on some Android devices.
|
||||
http_archive(
|
||||
name = "com_github_glog_glog_windows",
|
||||
strip_prefix = "glog-3a0d4d22c5ae0b9a2216988411cfa6bf860cc372",
|
||||
sha256 = "170d08f80210b82d95563f4723a15095eff1aad1863000e8eeb569c96a98fefb",
|
||||
urls = [
|
||||
"https://github.com/google/glog/archive/3a0d4d22c5ae0b9a2216988411cfa6bf860cc372.zip",
|
||||
],
|
||||
patches = [
|
||||
"@//third_party:com_github_glog_glog.diff",
|
||||
"@//third_party:com_github_glog_glog_windows_patch.diff",
|
||||
],
|
||||
patch_args = [
|
||||
"-p1",
|
||||
],
|
||||
)
|
||||
|
||||
# easyexif
|
||||
http_archive(
|
||||
name = "easyexif",
|
||||
|
|
2
third_party/BUILD
vendored
2
third_party/BUILD
vendored
|
@ -45,7 +45,7 @@ cc_library(
|
|||
"@com_github_glog_glog//:glog",
|
||||
],
|
||||
"//mediapipe:windows": [
|
||||
"@com_github_glog_glog//:glog",
|
||||
"@com_github_glog_glog_windows//:glog",
|
||||
],
|
||||
"//conditions:default": [
|
||||
"@com_github_glog_glog//:glog",
|
||||
|
|
15
third_party/com_github_glog_glog.diff
vendored
15
third_party/com_github_glog_glog.diff
vendored
|
@ -39,18 +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 4208d9e..3c86abf 100644
|
||||
--- a/bazel/glog.bzl
|
||||
+++ b/bazel/glog.bzl
|
||||
@@ -180,6 +180,9 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
|
||||
}),
|
||||
copts =
|
||||
select({
|
||||
+ "@bazel_tools//src/conditions:windows": ["-std=c++17"],
|
||||
+ "//conditions:default": [],
|
||||
+ }) + 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,
|
||||
|
|
26
third_party/com_github_glog_glog_windows_patch.diff
vendored
Normal file
26
third_party/com_github_glog_glog_windows_patch.diff
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
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,
|
Loading…
Reference in New Issue
Block a user