Add missing ninja dependency on yasm binary
Change-Id: I9e0a5a7ed0c68958240c978919f6bb8db9f6f59e
diff --git a/yasm_assemble.gni b/yasm_assemble.gni
index b05bcf5..1724f01 100644
--- a/yasm_assemble.gni
+++ b/yasm_assemble.gni
@@ -91,17 +91,19 @@
script = "//third_party/yasm/run_yasm.py"
sources = invoker.sources
- if (defined(invoker.inputs)) {
- inputs = invoker.inputs
- }
-
# Executable (first in the args). The binary might be in the root build dir
# (no cross-compiling) or in a toolchain-specific subdirectory of that
# (when cross-compiling).
yasm_label = "//third_party/yasm($host_toolchain)"
+ yasm_path = get_label_info(yasm_label, "root_out_dir") + "/yasm"
args = [ "./" + # Force current dir.
- rebase_path(get_label_info(yasm_label, "root_out_dir") + "/yasm",
- root_build_dir) ]
+ rebase_path(yasm_path, root_build_dir) ]
+
+ # List the yasm binary as an input so the action is re-run when it changes.
+ inputs = [ yasm_path ]
+ if (defined(invoker.inputs)) {
+ inputs += invoker.inputs
+ }
# Deps.
deps = [