Merge pull request #146 from haberman/amalgamate

Fixed amalgamation to not list header files explicitly.
pull/13171/head
Joshua Haberman 6 years ago committed by GitHub
commit 87b59f445b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      build_defs.bzl
  2. 2
      kokoro/ubuntu/build.sh

@ -182,13 +182,14 @@ _file_list_aspect = aspect(
) )
def _upb_amalgamation(ctx): def _upb_amalgamation(ctx):
inputs = []
srcs = [] srcs = []
hdrs = []
for lib in ctx.attr.libs: for lib in ctx.attr.libs:
srcs += lib[SrcList].srcs inputs += lib[SrcList].srcs
hdrs += lib[SrcList].hdrs inputs += lib[SrcList].hdrs
srcs += [src for src in lib[SrcList].srcs if src.path.endswith("c")]
ctx.actions.run( ctx.actions.run(
inputs = srcs + hdrs, inputs = inputs,
outputs = ctx.outputs.outs, outputs = ctx.outputs.outs,
arguments = ["", ctx.bin_dir.path + "/"] + [f.path for f in srcs], arguments = ["", ctx.bin_dir.path + "/"] + [f.path for f in srcs],
progress_message = "Making amalgamation", progress_message = "Making amalgamation",

@ -8,4 +8,4 @@ which bazel
bazel version bazel version
cd $(dirname $0)/../.. cd $(dirname $0)/../..
bazel test :all bazel test --test_output=errors :all

Loading…
Cancel
Save