summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-01-23 16:26:13 -0800
committerJoshua Haberman <jhaberman@gmail.com>2019-01-23 16:26:13 -0800
commit77371f050c317d01c5c089eb057b24d439f40dd3 (patch)
treed242be46e8289a13b192282ba35827396b573fb0 /BUILD
parent0517c462e687b721e53a4b3071fc961de4839ea4 (diff)
Some rearranging and cleanup.
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD103
1 files changed, 46 insertions, 57 deletions
diff --git a/BUILD b/BUILD
index 80daf4f..0a8a684 100644
--- a/BUILD
+++ b/BUILD
@@ -11,11 +11,6 @@ load(
"upb_proto_reflection_library",
)
-config_setting(
- name = "k8",
- values = {"cpu": "k8"},
-)
-
# C/C++ rules ##################################################################
cc_library(
@@ -112,31 +107,30 @@ cc_library(
deps = [":upb"],
)
-# Amalgamation #################################################################
-
-py_binary(
- name = "amalgamate",
- srcs = ["tools/amalgamate.py"],
-)
+# upb compiler #################################################################
-upb_amalgamation(
- name = "gen_amalgamation",
- outs = [
- "upb.c",
- "upb.h",
+cc_library(
+ name = "upbc_generator",
+ srcs = [
+ "upbc/generator.cc",
+ "upbc/message_layout.cc",
+ "upbc/message_layout.h",
],
- amalgamator = ":amalgamate",
- libs = [
- ":upb",
- ":upb_pb",
- ":upb_json",
+ hdrs = ["upbc/generator.h"],
+ deps = [
+ "@absl//absl/strings",
+ "@com_google_protobuf//:protobuf",
+ "@com_google_protobuf//:protoc_lib",
],
)
-cc_library(
- name = "amalgamation",
- srcs = ["upb.c"],
- hdrs = ["upb.h"],
+cc_binary(
+ name = "protoc-gen-upb",
+ srcs = ["upbc/main.cc"],
+ deps = [
+ ":upbc_generator",
+ "@com_google_protobuf//:protoc_lib",
+ ],
)
# C/C++ tests ##################################################################
@@ -162,12 +156,6 @@ cc_test(
],
)
-upb_proto_reflection_library(
- name = "descriptor_upbproto",
- upbc = ":protoc-gen-upb",
- deps = ["descriptor_proto"],
-)
-
proto_library(
name = "test_decoder_proto",
srcs = [
@@ -296,6 +284,33 @@ sh_test(
],
)
+# Amalgamation #################################################################
+
+py_binary(
+ name = "amalgamate",
+ srcs = ["tools/amalgamate.py"],
+)
+
+upb_amalgamation(
+ name = "gen_amalgamation",
+ outs = [
+ "upb.c",
+ "upb.h",
+ ],
+ amalgamator = ":amalgamate",
+ libs = [
+ ":upb",
+ ":upb_pb",
+ ":upb_json",
+ ],
+)
+
+cc_library(
+ name = "amalgamation",
+ srcs = ["upb.c"],
+ hdrs = ["upb.h"],
+)
+
# Lua libraries. ###############################################################
lua_cclibrary(
@@ -352,32 +367,6 @@ lua_test(
luamain = "tests/bindings/lua/test_upb.pb.lua",
)
-# upb compiler #################################################################
-
-cc_library(
- name = "upbc_generator",
- srcs = [
- "upbc/generator.cc",
- "upbc/message_layout.cc",
- "upbc/message_layout.h",
- ],
- hdrs = ["upbc/generator.h"],
- deps = [
- "@absl//absl/strings",
- "@com_google_protobuf//:protobuf",
- "@com_google_protobuf//:protoc_lib",
- ],
-)
-
-cc_binary(
- name = "protoc-gen-upb",
- srcs = ["upbc/main.cc"],
- deps = [
- ":upbc_generator",
- "@com_google_protobuf//:protoc_lib",
- ],
-)
-
# Test the CMake build #########################################################
make_shell_script(
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback