From 98f7fbb59fc5aca00f47a8145ce1227550869cb8 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 6 Sep 2019 11:27:44 -0700 Subject: [PATCH] Load C++ rules from @rules_cc See https://github.com/bazelbuild/bazel/issues/8743. This will be required in Bazel 1.0. Protobuf was updated in https://github.com/protocolbuffers/protobuf/commit/bf0c69e1302fe9568fbe310cc54b37d20a9d16a3#diff-96239ee297e0a92ac6ff96a6bc434ef0. GoogleTest was updated in https://github.com/google/googletest/commit/6fd262ecf787d0dc2a91696fd4bf1d3ee1ebfa14. gflags has not yet been updated, so the repo still won't build with --incompatible_load_cc_rules_from_bzl. Tested with buildifier -warnings=native-cc -lint=warn **/BUILD. PiperOrigin-RevId: 267638515 --- WORKSPACE | 21 +++++++++++---------- test/syscalls/linux/BUILD | 1 + test/util/BUILD | 1 + 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index c403e774d..26e76e2d7 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -44,13 +44,14 @@ http_archive( ) # Load protobuf dependencies. -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -git_repository( +http_archive( name = "com_google_protobuf", - commit = "09745575a923640154bcf307fba8aedff47f240a", - remote = "https://github.com/protocolbuffers/protobuf", - shallow_since = "1558721209 -0700", + sha256 = "532d2575d8c0992065bb19ec5fba13aa3683499726f6055c11b474f91a00bb0c", + strip_prefix = "protobuf-7f520092d9050d96fb4b707ad11a51701af4ce49", + urls = [ + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/7f520092d9050d96fb4b707ad11a51701af4ce49.zip", + "https://github.com/protocolbuffers/protobuf/archive/7f520092d9050d96fb4b707ad11a51701af4ce49.zip", + ], ) load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") @@ -242,10 +243,10 @@ http_archive( http_archive( name = "com_google_googletest", - sha256 = "db657310d3c5ca2d3f674e3a4b79718d1d39da70604568ee0568ba8e39065ef4", - strip_prefix = "googletest-31200def0dec8a624c861f919e86e4444e6e6ee7", + sha256 = "0a10bea96d8670e5eef948d79d824162b1577bb7889539e49ec786bfc3e48912", + strip_prefix = "googletest-565f1b848215b77c3732bca345fe76a0431d8b34", urls = [ - "https://mirror.bazel.build/github.com/google/googletest/archive/31200def0dec8a624c861f919e86e4444e6e6ee7.tar.gz", - "https://github.com/google/googletest/archive/31200def0dec8a624c861f919e86e4444e6e6ee7.tar.gz", + "https://mirror.bazel.build/github.com/google/googletest/archive/565f1b848215b77c3732bca345fe76a0431d8b34.tar.gz", + "https://github.com/google/googletest/archive/565f1b848215b77c3732bca345fe76a0431d8b34.tar.gz", ], ) diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD index c67ceddb6..34057e3d0 100644 --- a/test/syscalls/linux/BUILD +++ b/test/syscalls/linux/BUILD @@ -1,3 +1,4 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") load("//test/syscalls:build_defs.bzl", "select_for_linux") package( diff --git a/test/util/BUILD b/test/util/BUILD index 8afd89d8d..64daa0597 100644 --- a/test/util/BUILD +++ b/test/util/BUILD @@ -1,3 +1,4 @@ +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") load("//test/syscalls:build_defs.bzl", "select_for_linux") package(