Add dependency support for yasm
Bug: 37719672
Test: lunch aosp_x86-eng; m native
Test: m out/soong/.intermediates/external/libvpx/libvpx/android_x86_static_core/obj/external/libvpx/libvpx/vp8/common/x86/copy_sse2.o
Test: NINJA_ARGS="-t deps out/soong/.intermediates/external/libvpx/libvpx/android_x87_static_core/obj/external/libvpx/libvpx/vp8/common/x86/copy_sse2.o" m
Change-Id: I01763b5870f994f7f0c6ac9d10f112f73addd7c7
diff --git a/cc/builder.go b/cc/builder.go
index 873b117..b237551 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -151,8 +151,10 @@
yasm = pctx.AndroidStaticRule("yasm",
blueprint.RuleParams{
- Command: "$yasmCmd $asFlags -o $out $in",
+ Command: "$yasmCmd $asFlags -o $out $in && $yasmCmd $asFlags -M $in >$out.d",
CommandDeps: []string{"$yasmCmd"},
+ Depfile: "$out.d",
+ Deps: blueprint.DepsGCC,
},
"asFlags")