Always generate -host phony target for host modules
HostCross variants will create an additional -host-cross phony. This
matches the implementation in build/make/core/base_rules.mk
With this CL, phony targets like `adb-host` will be created.
Test: verified that adb-host phony exists in soong only build
Change-Id: I9daf890bbde7e27c49a3f9f8ba78238991a8cf43
diff --git a/android/module.go b/android/module.go
index 75b550a..b9fa657 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1722,12 +1722,13 @@
if ctx.Device() {
// Generate a target suffix for use in atest etc.
ctx.Phony(namespacePrefix+ctx.ModuleName()+"-target"+suffix, deps...)
- } else if ctx.Target().HostCross {
- // Generate a host-cross suffix for use in atest etc.
- ctx.Phony(namespacePrefix+ctx.ModuleName()+"-host-cross"+suffix, deps...)
} else {
// Generate a host suffix for use in atest etc.
ctx.Phony(namespacePrefix+ctx.ModuleName()+"-host"+suffix, deps...)
+ if ctx.Target().HostCross {
+ // Generate a host-cross suffix for use in atest etc.
+ ctx.Phony(namespacePrefix+ctx.ModuleName()+"-host-cross"+suffix, deps...)
+ }
}
info.BlueprintDir = ctx.ModuleDir()