This is needed to make protobuf/bazel package minimal for other proto rules. Keep 4 public bzl files in upb/bazel. They end up under protobuf/bazel, and they are legitimately used by other repositories. Move upb_proto_library_internal/* under bazel/private. Those are utilities used in the rules. Moving them one level deeper makes protobuf/bazel package clean for other rules. Move build_defs.bzl and amalgamation under /upb/bazel. Those are utilities used in the build. Move lua.BUILD and python* uner /python/dist. Those are used in the WORKSPACE dependency setup. PiperOrigin-RevId: 621442236pull/16324/head
parent
dc5053acc4
commit
d7f032ad15
43 changed files with 142 additions and 113 deletions
@ -0,0 +1,30 @@ |
||||
# Copyright (c) 2009-2021, Google LLC |
||||
# All rights reserved. |
||||
# |
||||
# Use of this source code is governed by a BSD-style |
||||
# license that can be found in the LICENSE file or at |
||||
# https://developers.google.com/open-source/licenses/bsd |
||||
|
||||
load("@bazel_skylib//:bzl_library.bzl", "bzl_library") |
||||
|
||||
# begin:google_only |
||||
# package(default_applicable_licenses = ["//upb:license"]) |
||||
# end:google_only |
||||
|
||||
licenses(["notice"]) |
||||
|
||||
bzl_library( |
||||
name = "upb_proto_library_internal_bzl", |
||||
srcs = [ |
||||
"upb_proto_library_internal/aspect.bzl", |
||||
"upb_proto_library_internal/cc_library_func.bzl", |
||||
"upb_proto_library_internal/copts.bzl", |
||||
"upb_proto_library_internal/rule.bzl", |
||||
], |
||||
visibility = ["//bazel:__pkg__"], |
||||
deps = [ |
||||
"@bazel_skylib//lib:paths", |
||||
"@bazel_tools//tools/cpp:toolchain_utils.bzl", |
||||
"@rules_proto//proto:defs", |
||||
], |
||||
) |
@ -1,8 +1,8 @@ |
||||
"""Implementation of the aspect that powers the upb_*_proto_library() rules.""" |
||||
|
||||
load("@rules_proto//proto:defs.bzl", "proto_common") |
||||
load("//bazel:upb_proto_library_internal/cc_library_func.bzl", "cc_library_func") |
||||
load("//bazel:upb_proto_library_internal/copts.bzl", "UpbProtoLibraryCoptsInfo") |
||||
load(":upb_proto_library_internal/cc_library_func.bzl", "cc_library_func") |
||||
load(":upb_proto_library_internal/copts.bzl", "UpbProtoLibraryCoptsInfo") |
||||
|
||||
# begin:github_only |
||||
_is_google3 = False |
@ -0,0 +1,31 @@ |
||||
# Copyright (c) 2009-2021, Google LLC |
||||
# All rights reserved. |
||||
# |
||||
# Use of this source code is governed by a BSD-style |
||||
# license that can be found in the LICENSE file or at |
||||
# https://developers.google.com/open-source/licenses/bsd |
||||
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects") |
||||
load("@rules_python//python:defs.bzl", "py_binary") |
||||
|
||||
# begin:google_only |
||||
# package(default_applicable_licenses = ["//upb:license"]) |
||||
# end:google_only |
||||
|
||||
licenses(["notice"]) |
||||
|
||||
# begin:google_only |
||||
# selects.config_setting_group( |
||||
# name = "android_opt", |
||||
# match_all = [ |
||||
# "//tools/cc_target_os:android", |
||||
# "//tools/compilation_mode:opt", |
||||
# ], |
||||
# ) |
||||
# end:google_only |
||||
|
||||
py_binary( |
||||
name = "amalgamate", |
||||
srcs = ["amalgamate.py"], |
||||
visibility = ["//upb:__pkg__"], |
||||
) |
Loading…
Reference in new issue