[bindc] Forward deps from invoker in bind_rules target
The bind library dependencies get put into the response file but it's
useful to have dependencies on other targets for templating etc.
Change-Id: Idfc4183fd5f0d4beec954aca94ede4d680b07076
diff --git a/build/bind/bind.gni b/build/bind/bind.gni
index ae29440..72c3c82 100644
--- a/build/bind/bind.gni
+++ b/build/bind/bind.gni
@@ -40,18 +40,14 @@
generated_file(response_file_target) {
data_keys = [ "sources" ]
forward_variables_from(invoker, [ "deps" ])
- outputs = [
- response_file,
- ]
+ outputs = [ response_file ]
}
compiled_action(target_name) {
tool = "//tools/bindc:bin"
tool_output_name = "bindc"
- sources = [
- invoker.rules,
- ]
+ sources = [ invoker.rules ]
args = [
rebase_path(invoker.rules, root_build_dir),
@@ -65,17 +61,14 @@
args += [ "--disable-autobind" ]
}
- inputs = [
- response_file,
- ]
+ inputs = [ response_file ]
- outputs = [
- "$target_gen_dir/$output_file",
- ]
+ outputs = [ "$target_gen_dir/$output_file" ]
- deps = [
- ":$response_file_target",
- ]
+ deps = [ ":$response_file_target" ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
}
}
@@ -97,9 +90,7 @@
group(target_name) {
metadata = {
- sources = [
- rebase_path(invoker.source, root_build_dir),
- ]
+ sources = [ rebase_path(invoker.source, root_build_dir) ]
}
forward_variables_from(invoker, [ "public_deps" ])