diff options
author | ambrosin <ambrosin@google.com> | 2022-05-06 03:20:17 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-05-06 03:21:11 -0700 |
commit | 1f71d98ac5b7016ece56d7c0de2c1d3671701f9e (patch) | |
tree | f20d8f513c94a68efd68f6eed46fea6ce0d68860 /cc/tink_cc_deps.bzl | |
parent | 6948297ffd79189a690b47fa4157def27fe735a1 (diff) | |
download | tink-1f71d98ac5b7016ece56d7c0de2c1d3671701f9e.tar.gz |
Remove dependency on @tink_base from @tink_cc.
Add Skylark, Proto and RBE dependencies directly to tink_cc_deps(|_init).bzl. As a consequence, tink_base_deps and tink_base_deps_init are no longer needed for building @tink_cc.
PiperOrigin-RevId: 446943041
Diffstat (limited to 'cc/tink_cc_deps.bzl')
-rw-r--r-- | cc/tink_cc_deps.bzl | 76 |
1 files changed, 63 insertions, 13 deletions
diff --git a/cc/tink_cc_deps.bzl b/cc/tink_cc_deps.bzl index 31e47463f..c292402b5 100644 --- a/cc/tink_cc_deps.bzl +++ b/cc/tink_cc_deps.bzl @@ -1,16 +1,60 @@ -""" -Dependencies of C++ Tink. -""" +"""Dependencies of C++ Tink.""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def tink_cc_deps(): - """ Loads dependencies of C++ Tink. + """Loads dependencies of C++ Tink.""" - """ + # Basic rules we need to add to bazel. + if not native.existing_rule("bazel_skylib"): + # Release from 2021-09-27. + http_archive( + name = "bazel_skylib", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", + ], + sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d", + ) + + # ------------------------------------------------------------------------- + # Protobuf. + # ------------------------------------------------------------------------- + # proto_library, cc_proto_library and java_proto_library rules implicitly + # depend respectively on: + # * @com_google_protobuf//:proto + # * @com_google_protobuf//:cc_toolchain + # * @com_google_protobuf//:java_toolchain + # This statement defines the @com_google_protobuf repo. + if not native.existing_rule("com_google_protobuf"): + # Release from 2021-06-08. + http_archive( + name = "com_google_protobuf", + strip_prefix = "protobuf-3.19.3", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.3.zip"], + sha256 = "6b6bf5cd8d0cca442745c4c3c9f527c83ad6ef35a405f64db5215889ac779b42", + ) + # ------------------------------------------------------------------------- + # Remote Build Execution (RBE). + # ------------------------------------------------------------------------- + if not native.existing_rule("bazel_toolchains"): + # Latest bazel_toolchains package on 2021-10-13. + http_archive( + name = "bazel_toolchains", + sha256 = "179ec02f809e86abf56356d8898c8bd74069f1bd7c56044050c2cd3d79d0e024", + strip_prefix = "bazel-toolchains-4.1.0", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz", + ], + ) + + # ------------------------------------------------------------------------- + # Abseil. + # ------------------------------------------------------------------------- if not native.existing_rule("com_google_absl"): - # Commit from 2021-12-03 + # Commit from 2021-12-03. http_archive( name = "com_google_absl", strip_prefix = "abseil-cpp-9336be04a242237cd41a525bedfcf3be1bb55377", @@ -18,8 +62,11 @@ def tink_cc_deps(): sha256 = "368be019fc8d69a566ac2cf7a75262d5ba8f6409e3ef3cdbcf0106bdeb32e91c", ) + # ------------------------------------------------------------------------- + # BoringSSL. + # ------------------------------------------------------------------------- if not native.existing_rule("boringssl"): - # Commit from 2021-07-02 + # Commit from 2021-07-02. http_archive( name = "boringssl", strip_prefix = "boringssl-7686eb8ac9bc60198cbc8354fcba7f54c02792ec", @@ -27,9 +74,11 @@ def tink_cc_deps(): sha256 = "73a7bc71f95f3259ddedc6cb5ba45d02f2359c43e75af354928b0471a428bb84", ) - # GoogleTest/GoogleMock framework. Used by most C++ unit-tests. + # ------------------------------------------------------------------------- + # GoogleTest/GoogleMock. + # ------------------------------------------------------------------------- if not native.existing_rule("com_google_googletest"): - # Release from 2021-06-11 + # Release from 2021-06-11. http_archive( name = "com_google_googletest", strip_prefix = "googletest-release-1.11.0", @@ -37,8 +86,11 @@ def tink_cc_deps(): sha256 = "b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5", ) + # ------------------------------------------------------------------------- + # Wycheproof (depends on Rapidjson). + # ------------------------------------------------------------------------- if not native.existing_rule("rapidjson"): - # Release from 2016-08-25; still the latest release on 2019-10-18 + # Release from 2016-08-25 (still the latest release as of 2022-05-05). http_archive( name = "rapidjson", url = "https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz", @@ -46,10 +98,8 @@ def tink_cc_deps(): strip_prefix = "rapidjson-1.1.0", build_file = "@tink_cc//:third_party/rapidjson.BUILD.bazel", ) - - # wycheproof, for JSON test vectors if not native.existing_rule("wycheproof"): - # Commit from 2019-12-17 + # Commit from 2019-12-17. http_archive( name = "wycheproof", strip_prefix = "wycheproof-d8ed1ba95ac4c551db67f410c06131c3bc00a97c", |