|
|
|
@ -10,11 +10,13 @@ |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
load("@bazel_skylib//lib:paths.bzl", "paths") |
|
|
|
|
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain") |
|
|
|
|
load("//bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "upb_proto_library_aspect") |
|
|
|
|
|
|
|
|
|
# begin:google_only |
|
|
|
|
# load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain") |
|
|
|
|
# |
|
|
|
|
# def upb_use_cpp_toolchain(): |
|
|
|
|
# # TODO: We shouldn't need to add this to the result of use_cpp_toolchain(). |
|
|
|
|
# return [ |
|
|
|
|
# config_common.toolchain_type( |
|
|
|
|
# "@bazel_tools//tools/cpp:cc_runtimes_toolchain_type", |
|
|
|
@ -23,26 +25,15 @@ load("@bazel_skylib//lib:paths.bzl", "paths") |
|
|
|
|
# ] + use_cpp_toolchain() |
|
|
|
|
# |
|
|
|
|
# end:google_only |
|
|
|
|
# begin:github_only |
|
|
|
|
# Compatibility code for Bazel 4.x. Remove this when we drop support for Bazel 4.x. |
|
|
|
|
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") |
|
|
|
|
load("//bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "upb_proto_library_aspect") |
|
|
|
|
|
|
|
|
|
# begin:github_only |
|
|
|
|
def upb_use_cpp_toolchain(): |
|
|
|
|
return ["@bazel_tools//tools/cpp:toolchain_type"] |
|
|
|
|
return use_cpp_toolchain() |
|
|
|
|
|
|
|
|
|
# end:github_only |
|
|
|
|
|
|
|
|
|
# Generic support code ######################################################### |
|
|
|
|
|
|
|
|
|
# begin:github_only |
|
|
|
|
_is_google3 = False |
|
|
|
|
# end:github_only |
|
|
|
|
|
|
|
|
|
# begin:google_only |
|
|
|
|
# _is_google3 = True |
|
|
|
|
# end:google_only |
|
|
|
|
|
|
|
|
|
def _get_real_short_path(file): |
|
|
|
|
# For some reason, files from other archives have short paths that look like: |
|
|
|
|
# ../com_google_protobuf/google/protobuf/descriptor.proto |
|
|
|
|