diff options
author | 2025-01-24 22:22:37 +0000 | |
---|---|---|
committer | 2025-01-24 22:47:49 +0000 | |
commit | 25301f131198e44948bed10c6741afb6bfbf9941 (patch) | |
tree | d2269e270d525ae6b2a8157b1c288f6808be3df3 /android/module.go | |
parent | c780d49d8a72e410b254a222f8b382fb6ed89bcd (diff) |
Create a host/target phony target for soong modules
This phony target will be responsible for building the specific
device/host variant of a module. These phony targets are useful for
local development as well as for atest.
Test: m nothing
Change-Id: Id3cd92f49bdc834866a8c2083ef5212ab7263bbc
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index da7541637..75b550ac8 100644 --- a/android/module.go +++ b/android/module.go @@ -1719,6 +1719,16 @@ func (m *ModuleBase) generateModuleTarget(ctx *moduleContext) { } ctx.Phony(namespacePrefix+ctx.ModuleName()+suffix, deps...) + 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...) + } info.BlueprintDir = ctx.ModuleDir() SetProvider(ctx, FinalModuleBuildTargetsProvider, info) |