summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-05-07 11:30:28 -0700
committerJoshua Haberman <jhaberman@gmail.com>2019-05-07 11:30:28 -0700
commit20d849a5e03945a5c764f3ffa98a6525378274e9 (patch)
tree9a45628b618117a0e0868076c45443e571ec5450
parentb08819749e6c2a6d8d771f954f6162933a8ba648 (diff)
Fixes for Bazel 0.25.
Disabled the conformance tests for now because I didn't push the necessary changes to the protobuf repo yet.
-rw-r--r--BUILD78
-rw-r--r--WORKSPACE15
-rw-r--r--build_defs.bzl16
3 files changed, 58 insertions, 51 deletions
diff --git a/BUILD b/BUILD
index 5b1dd33..629287c 100644
--- a/BUILD
+++ b/BUILD
@@ -350,45 +350,45 @@ cc_test(
copts = CPPOPTS,
)
-upb_proto_library(
- name = "conformance_proto_upb",
- deps = ["@com_google_protobuf//:conformance_proto"],
-)
-
-upb_proto_library(
- name = "test_messages_proto3_proto_upb",
- deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
-)
-
-cc_binary(
- name = "conformance_upb",
- srcs = [
- "tests/conformance_upb.c",
- ],
- copts = COPTS + ["-Ibazel-out/k8-fastbuild/bin"],
- deps = [
- ":conformance_proto_upb",
- ":test_messages_proto3_proto_upb",
- ":upb",
- ],
-)
-
-make_shell_script(
- name = "gen_test_conformance_upb",
- out = "test_conformance_upb.sh",
- contents = "$(rlocation com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)",
-)
-
-sh_test(
- name = "test_conformance_upb",
- srcs = ["test_conformance_upb.sh"],
- data = [
- "tests/conformance_upb_failures.txt",
- ":conformance_upb",
- "@bazel_tools//tools/bash/runfiles",
- "@com_google_protobuf//:conformance_test_runner",
- ],
-)
+#upb_proto_library(
+# name = "conformance_proto_upb",
+# deps = ["@com_google_protobuf//:conformance_proto"],
+#)
+
+#upb_proto_library(
+# name = "test_messages_proto3_proto_upb",
+# deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
+#)
+
+#cc_binary(
+# name = "conformance_upb",
+# srcs = [
+# "tests/conformance_upb.c",
+# ],
+# copts = COPTS + ["-Ibazel-out/k8-fastbuild/bin"],
+# deps = [
+# ":conformance_proto_upb",
+# ":test_messages_proto3_proto_upb",
+# ":upb",
+# ],
+#)
+#
+#make_shell_script(
+# name = "gen_test_conformance_upb",
+# out = "test_conformance_upb.sh",
+# contents = "$(rlocation com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)",
+#)
+#
+#sh_test(
+# name = "test_conformance_upb",
+# srcs = ["test_conformance_upb.sh"],
+# data = [
+# "tests/conformance_upb_failures.txt",
+# ":conformance_upb",
+# "@bazel_tools//tools/bash/runfiles",
+# "@com_google_protobuf//:conformance_test_runner",
+# ],
+#)
# Amalgamation #################################################################
diff --git a/WORKSPACE b/WORKSPACE
index d49b894..ff89757 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -17,11 +17,16 @@ http_archive(
git_repository(
name = "com_google_protobuf",
- commit = "25feb59620627b673df76813dfd66e3f565765e7",
- #sha256 = "d7a221b3d4fb4f05b7473795ccea9e05dab3b8721f6286a95fffbffc2d926f8b",
- remote = "https://github.com/haberman/protobuf.git",
- shallow_since = "1541281400 -0700"
- #tag = "conformance-build-tag",
+ commit = "ec1a70913e5793a7d0a7b5fbf7e0e4f75409dd41",
+ remote = "https://github.com/protocolbuffers/protobuf.git",
+)
+
+http_archive(
+ name = "zlib",
+ build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
+ sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
+ strip_prefix = "zlib-1.2.11",
+ urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
)
git_repository(
diff --git a/build_defs.bzl b/build_defs.bzl
index 9deb336..f24cff5 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -1,3 +1,7 @@
+
+load("@bazel_skylib//lib:paths.bzl", "paths")
+load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
+
_shell_find_runfiles = """
# --- begin runfiles.bash initialization ---
# Copy-pasted from Bazel's Bash runfiles library (tools/bash/runfiles/runfiles.bash).
@@ -23,10 +27,6 @@ _shell_find_runfiles = """
# --- end runfiles.bash initialization ---
"""
-load("@bazel_skylib//lib:paths.bzl", "paths")
-load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
-load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "CPP_LINK_STATIC_LIBRARY_ACTION_NAME")
-
def _librule(name):
return name + "_lib"
@@ -286,15 +286,17 @@ def cc_library_func(ctx, hdrs, srcs, deps):
unsupported_features = ctx.disabled_features,
)
compilation_info = cc_common.compile(
- ctx = ctx,
+ actions = ctx.actions,
feature_configuration = feature_configuration,
cc_toolchain = toolchain,
+ name = "upb_lib",
srcs = srcs,
- hdrs = hdrs,
+ public_hdrs = hdrs,
compilation_contexts = compilation_contexts,
)
linking_info = cc_common.link(
- ctx = ctx,
+ actions = ctx.actions,
+ name = "upb_lib",
feature_configuration = feature_configuration,
cc_toolchain = toolchain,
cc_compilation_outputs = compilation_info.cc_compilation_outputs,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback