diff options
author | Geoff Lang <geofflang@google.com> | 2020-02-25 08:46:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 08:46:52 +0300 |
commit | fb6e3e48d51d1efdc31f016d7e52f528b93235a8 (patch) | |
tree | 6472f86cf46bcf20e30858a916fbdda7a484d1ee /build_defs.bzl | |
parent | 8910ea5f1c7bc38f79a8b70b265cd9d1571f4b56 (diff) |
Combine extinst-name and extinst-output-base into one arg. (#3200)
* Combine the extinst-name and extinst-output-base into one arg.
Some build systems such as Android blueprints require that the inputs
and outputs of generator scripts are all provided as arguments. These
two arguments to generate_language_headers.py are combined to form the
output path in the script. This change simply lets the user provide the
whole output path as an argument.
* Fix typo in build_defs.bzl and update Android.mk
Diffstat (limited to 'build_defs.bzl')
-rw-r--r-- | build_defs.bzl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/build_defs.bzl b/build_defs.bzl index 5d913a14c..15b70c733 100644 --- a/build_defs.bzl +++ b/build_defs.bzl @@ -167,16 +167,16 @@ def generate_vendor_tables(extension, operand_kind_prefix = ""): def generate_extinst_lang_headers(name, grammar = None): if not grammar: fail("Must specify grammar", "grammar") - fmtargs = [name] + outs = [name + ".h"] + fmtargs = outs native.genrule( name = "gen_extinst_lang_headers_" + name, srcs = [grammar], - outs = [name + ".h"], + outs = outs, cmd = ( "$(location :generate_language_headers) " + - "--extinst-name={0} " + "--extinst-grammar=$< " + - "--extinst-output-base=$(@D)/{0}" + "--extinst-output-path=$(location {0})" ).format(*fmtargs), tools = [":generate_language_headers"], visibility = ["//visibility:private"], |