diff --git a/bazel/repository_defs.bzl b/bazel/repository_defs.bzl deleted file mode 100644 index 7b6e78e8b8..0000000000 --- a/bazel/repository_defs.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# A hacky way to work around the fact that native.bazel_version is only -# available from WORKSPACE macros, not BUILD macros or rules. -# -# Hopefully we can remove this if/when this is fixed: -# https://github.com/bazelbuild/bazel/issues/8305 - -def _impl(repository_ctx): - s = "bazel_version = \"" + native.bazel_version + "\"" - repository_ctx.file("bazel_version.bzl", s) - repository_ctx.file("BUILD", "") - -bazel_version_repository = repository_rule( - implementation = _impl, - local = True, -) diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 9ad578f96f..596b9c4c41 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -6,11 +6,6 @@ load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") -# copybara:strip_for_google3_begin -load("@bazel_skylib//lib:versions.bzl", "versions") -load("@upb_bazel_version//:bazel_version.bzl", "bazel_version") -# copybara:strip_end - # Generic support code ######################################################### _is_bazel = not hasattr(native, "genmpm") @@ -79,34 +74,6 @@ def _cc_library_func(ctx, name, hdrs, srcs, dep_ccinfos): unsupported_features = ctx.disabled_features, ) - # copybara:strip_for_google3_begin - if bazel_version == "0.24.1": - # Compatibility code until gRPC is on 0.25.2 or later. - compilation_info = cc_common.compile( - ctx = ctx, - feature_configuration = feature_configuration, - cc_toolchain = toolchain, - srcs = srcs, - hdrs = hdrs, - compilation_contexts = compilation_contexts, - ) - linking_info = cc_common.link( - ctx = ctx, - feature_configuration = feature_configuration, - cc_toolchain = toolchain, - cc_compilation_outputs = compilation_info.cc_compilation_outputs, - linking_contexts = linking_contexts, - ) - return CcInfo( - compilation_context = compilation_info.compilation_context, - linking_context = linking_info.linking_context, - ) - - if not versions.is_at_least("0.25.2", bazel_version): - fail("upb requires Bazel >=0.25.2 or 0.24.1") - - # copybara:strip_end - blaze_only_args = {} if not _is_bazel: diff --git a/bazel/workspace_deps.bzl b/bazel/workspace_deps.bzl index 262ebd8683..2a7f88f495 100644 --- a/bazel/workspace_deps.bzl +++ b/bazel/workspace_deps.bzl @@ -2,14 +2,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -load("//bazel:repository_defs.bzl", "bazel_version_repository") def upb_deps(): - maybe( - bazel_version_repository, - name = "upb_bazel_version", - ) - maybe( git_repository, name = "com_google_absl",