summaryrefslogtreecommitdiff
path: root/build_defs.bzl
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-12-22 16:34:34 -0800
committerGitHub <noreply@github.com>2018-12-22 16:34:34 -0800
commit87b59f445b7be42685491b816416a4e360e30b33 (patch)
tree32836d3b743193fefb430c5e8988db776463276a /build_defs.bzl
parent161258a2adeaffd4e2cd5ab4ea370224e618ec95 (diff)
parent51a646ec11c0ba6a0cc1aa75e2474e5a9c282e47 (diff)
Merge pull request #146 from haberman/amalgamate
Fixed amalgamation to not list header files explicitly.
Diffstat (limited to 'build_defs.bzl')
-rw-r--r--build_defs.bzl9
1 files changed, 5 insertions, 4 deletions
diff --git a/build_defs.bzl b/build_defs.bzl
index 8251014..7445fce 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -182,13 +182,14 @@ _file_list_aspect = aspect(
)
def _upb_amalgamation(ctx):
+ inputs = []
srcs = []
- hdrs = []
for lib in ctx.attr.libs:
- srcs += lib[SrcList].srcs
- hdrs += lib[SrcList].hdrs
+ inputs += lib[SrcList].srcs
+ inputs += lib[SrcList].hdrs
+ srcs += [src for src in lib[SrcList].srcs if src.path.endswith("c")]
ctx.actions.run(
- inputs = srcs + hdrs,
+ inputs = inputs,
outputs = ctx.outputs.outs,
arguments = ["", ctx.bin_dir.path + "/"] + [f.path for f in srcs],
progress_message = "Making amalgamation",
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback