Skip to content

Commit 80d1126

Browse files
authored
Merge pull request #132 from google/cpp-sync
OSS export
2 parents b82d6af + f7209ad commit 80d1126

File tree

137 files changed

+1150
-1276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1150
-1276
lines changed

base/BUILD

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,6 @@ licenses(["notice"]) # Apache v2.0
22

33
package(default_visibility = ["//visibility:public"])
44

5-
cc_library(
6-
name = "testing",
7-
testonly = True,
8-
srcs = [
9-
"testing.cc",
10-
],
11-
hdrs = [
12-
"testing.h",
13-
],
14-
deps = [
15-
"@com_google_absl//absl/status",
16-
"@com_google_absl//absl/status:statusor",
17-
"@com_google_googletest//:gtest_main",
18-
],
19-
)
20-
21-
cc_library(
22-
name = "status_macros",
23-
hdrs = [
24-
"status_macros.h",
25-
],
26-
)
27-
285
cc_library(
296
name = "unilib",
307
srcs = [

base/status_macros.h

Lines changed: 0 additions & 81 deletions
This file was deleted.

bazel/deps.bzl

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,47 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
66

77
def base_deps():
88
"""Base evaluator and test dependencies."""
9+
10+
# LTS, March 2021, Patch 2
11+
ABSL_SHA1 = "278e0a071885a22dcd2fd1b5576cc44757299343"
12+
ABSL_SHA256 = "ff5ea6f91f9bcd0f368346ef707d0a80a372b71de5b6ae69ac11d0ca41688b8f"
913
http_archive(
1014
name = "com_google_absl",
15+
urls = ["https://github.com/abseil/abseil-cpp/archive/" + ABSL_SHA1 + ".zip"],
16+
strip_prefix = "abseil-cpp-" + ABSL_SHA1,
17+
sha256 = ABSL_SHA256,
1118
patches = ["//bazel:abseil.patch"],
1219
patch_args = ["-p1"],
13-
strip_prefix = "abseil-cpp-master",
14-
urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"],
1520
)
1621

22+
# v1.11.0
23+
GOOGLETEST_SHA1 = "e2239ee6043f73722e7aa812a459f54a28552929"
24+
GOOGLETEST_SHA256 = "8daa1a71395892f7c1ec5f7cb5b099a02e606be720d62f1a6a98f8f8898ec826"
1725
http_archive(
1826
name = "com_google_googletest",
19-
urls = ["https://github.com/google/googletest/archive/master.zip"],
20-
strip_prefix = "googletest-master",
27+
urls = ["https://github.com/google/googletest/archive/" + GOOGLETEST_SHA1 + ".zip"],
28+
strip_prefix = "googletest-" + GOOGLETEST_SHA1,
29+
sha256 = GOOGLETEST_SHA256,
2130
)
2231

32+
# v1.6.0
33+
BENCHMARK_SHA1 = "f91b6b42b1b9854772a90ae9501464a161707d1e"
34+
BENCHMARK_SHA256 = "00bd0837db9266c758a087cdf0831a0d3e337c6bb9e3fad75d2be4f9bf480d95"
2335
http_archive(
2436
name = "com_github_google_benchmark",
25-
urls = ["https://github.com/google/benchmark/archive/master.zip"],
26-
strip_prefix = "benchmark-master",
37+
urls = ["https://github.com/google/benchmark/archive/" + BENCHMARK_SHA1 + ".zip"],
38+
strip_prefix = "benchmark-" + BENCHMARK_SHA1,
39+
sha256 = BENCHMARK_SHA256,
2740
)
2841

42+
# 2021-09-01
43+
RE2_SHA1 = "8e08f47b11b413302749c0d8b17a1c94777495d5"
44+
RE2_SHA256 = "d635a3353bb8ffc33b0779c97c1c9d6f2dbdda286106a73bbcf498f66edacd74"
2945
http_archive(
3046
name = "com_googlesource_code_re2",
31-
strip_prefix = "re2-main",
32-
urls = ["https://github.com/google/re2/archive/main.zip"],
47+
urls = ["https://github.com/google/re2/archive/" + RE2_SHA1 + ".zip"],
48+
strip_prefix = "re2-" + RE2_SHA1,
49+
sha256 = RE2_SHA256,
3350
)
3451

3552
PROTOBUF_VERSION = "3.18.0"

common/BUILD

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ cc_test(
4242
srcs = ["escaping_test.cc"],
4343
deps = [
4444
":escaping",
45-
"//base:testing",
45+
"//internal:testing",
4646
],
4747
)
4848

@@ -51,10 +51,9 @@ cc_library(
5151
srcs = ["overflow.cc"],
5252
hdrs = ["overflow.h"],
5353
deps = [
54-
"//base:status_macros",
54+
"//internal:status_macros",
5555
"@com_google_absl//absl/status",
5656
"@com_google_absl//absl/status:statusor",
57-
"@com_google_absl//absl/strings",
5857
"@com_google_absl//absl/time",
5958
],
6059
)
@@ -64,7 +63,7 @@ cc_test(
6463
srcs = ["overflow_test.cc"],
6564
deps = [
6665
":overflow",
67-
"//base:testing",
66+
"//internal:testing",
6867
"@com_google_absl//absl/functional:function_ref",
6968
"@com_google_absl//absl/status",
7069
"@com_google_absl//absl/time",

common/escaping_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "common/escaping.h"
22

3-
#include "base/testing.h"
4-
#include "gtest/gtest.h"
3+
#include "internal/testing.h"
54

65
namespace google {
76
namespace api {

0 commit comments

Comments
 (0)