Moved bazel files to bazel/ directory.

pull/13171/head
Joshua Haberman 6 years ago
parent f74cb51f11
commit 5611ff267b
  1. 4
      BUILD
  2. 6
      WORKSPACE
  3. 0
      bazel/BUILD
  4. 0
      bazel/build_defs.bzl
  5. 0
      bazel/lua.BUILD
  6. 0
      bazel/ragel.BUILD
  7. 0
      bazel/repository_defs.bzl
  8. 10
      bazel/upb_proto_library.bzl
  9. 2
      bazel/workspace_deps.bzl
  10. 22
      tools/copy_genfiles.sh.in

@ -1,5 +1,5 @@
load(
":build_defs.bzl",
"//bazel:build_defs.bzl",
"generated_file_staleness_test",
"licenses", # copybara:strip_for_google3
"lua_binary",
@ -11,7 +11,7 @@ load(
)
load(
":upb_proto_library.bzl",
"//bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)

@ -1,13 +1,13 @@
workspace(name = "upb")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@upb//:workspace_deps.bzl", "upb_deps")
load("//bazel:workspace_deps.bzl", "upb_deps")
upb_deps()
http_archive(
name = "lua",
build_file = "//:lua.BUILD",
build_file = "//bazel:lua.BUILD",
sha256 = "b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b",
strip_prefix = "lua-5.2.4",
urls = [
@ -18,7 +18,7 @@ http_archive(
http_archive(
name = "ragel",
build_file = "//:ragel.BUILD",
build_file = "//bazel:ragel.BUILD",
sha256 = "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f",
strip_prefix = "ragel-6.10",
urls = ["http://www.colm.net/files/ragel/ragel-6.10.tar.gz"],

@ -218,7 +218,7 @@ _upb_proto_library_aspect = aspect(
"_upbc": attr.label(
executable = True,
cfg = "host",
default = ":protoc-gen-upb",
default = "//:protoc-gen-upb",
),
"_protoc": attr.label(
executable = True,
@ -228,7 +228,7 @@ _upb_proto_library_aspect = aspect(
"_cc_toolchain": attr.label(
default = "@bazel_tools//tools/cpp:current_cc_toolchain",
),
"_upb": attr.label_list(default = [":upb"]),
"_upb": attr.label_list(default = ["//:upb"]),
"_ext": attr.string(default = ".upb"),
}),
implementation = _upb_proto_aspect_impl,
@ -255,7 +255,7 @@ _upb_proto_reflection_library_aspect = aspect(
"_upbc": attr.label(
executable = True,
cfg = "host",
default = ":protoc-gen-upb",
default = "//:protoc-gen-upb",
),
"_protoc": attr.label(
executable = True,
@ -267,8 +267,8 @@ _upb_proto_reflection_library_aspect = aspect(
),
"_upb": attr.label_list(
default = [
":upb",
":reflection",
"//:upb",
"//:reflection",
],
),
"_ext": attr.string(default = ".upbdefs"),

@ -1,7 +1,7 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@upb//:repository_defs.bzl", "bazel_version_repository")
load("//bazel:repository_defs.bzl", "bazel_version_repository")
def upb_deps():
bazel_version_repository(

@ -1,22 +0,0 @@
#!/usr/bin/env bash
set -e
BINDIR=`dirname "$0"`/..
SRCDIR=${CMAKE_CURRENT_SOURCE_DIR}
EXIT=0
function try_copy() {
if [ ! -f $1 ]; then
echo "Can't find $1, skipping..."
EXIT=1
else
cp $1 $2
echo $1
fi
}
try_copy $BINDIR/google/protobuf/descriptor.upb.c $SRCDIR/google/protobuf
try_copy $BINDIR/google/protobuf/descriptor.upb.h $SRCDIR/google/protobuf
try_copy $BINDIR/upb/json/parser.c $SRCDIR/upb/json
try_copy $BINDIR/upb/pb/compile_decoder_x64.h $SRCDIR/upb/pb
Loading…
Cancel
Save