Support multiple dists per Android.bp module, and dist output selection.
This CL adds "dists" to the base property struct to support multiple dist file configurations, and generic tag support to dist tagged outputs of modules. Fixes: b/152834186 Test: soong tests and `m sdk dist` Change-Id: I80c86bc9b7b09e671f640a4480c45d438bdd9a2a Signed-off-by: Jingwen Chen <jingwen@google.com>
This commit is contained in:
@@ -86,8 +86,11 @@ func (mod *Module) AndroidMk() android.AndroidMkData {
|
||||
func (binary *binaryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
|
||||
ctx.subAndroidMk(ret, binary.baseCompiler)
|
||||
|
||||
if binary.distFile.Valid() {
|
||||
ret.DistFiles = android.MakeDefaultDistFiles(binary.distFile.Path())
|
||||
}
|
||||
|
||||
ret.Class = "EXECUTABLES"
|
||||
ret.DistFile = binary.distFile
|
||||
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
|
||||
fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", binary.unstrippedOutputFile.String())
|
||||
if binary.coverageOutputZipFile.Valid() {
|
||||
@@ -127,7 +130,10 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An
|
||||
ret.Class = "SHARED_LIBRARIES"
|
||||
}
|
||||
|
||||
ret.DistFile = library.distFile
|
||||
if library.distFile.Valid() {
|
||||
ret.DistFiles = android.MakeDefaultDistFiles(library.distFile.Path())
|
||||
}
|
||||
|
||||
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
|
||||
if !library.rlib() {
|
||||
fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", library.unstrippedOutputFile.String())
|
||||
@@ -143,7 +149,9 @@ func (procMacro *procMacroDecorator) AndroidMk(ctx AndroidMkContext, ret *androi
|
||||
ctx.subAndroidMk(ret, procMacro.baseCompiler)
|
||||
|
||||
ret.Class = "PROC_MACRO_LIBRARIES"
|
||||
ret.DistFile = procMacro.distFile
|
||||
if procMacro.distFile.Valid() {
|
||||
ret.DistFiles = android.MakeDefaultDistFiles(procMacro.distFile.Path())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user