diff options
Diffstat (limited to 'android/androidmk.go')
-rw-r--r-- | android/androidmk.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/android/androidmk.go b/android/androidmk.go index 5c715b473..832c7dfe3 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -288,6 +288,8 @@ func (a *AndroidMkEntries) AddCompatibilityTestSuites(suites ...string) { // The contributions to the dist. type distContributions struct { + // Path to license metadata file. + licenseMetadataFile Path // List of goals and the dist copy instructions. copiesForGoals []*copiesForGoals } @@ -364,6 +366,8 @@ func (a *AndroidMkEntries) getDistContributions(mod blueprint.Module) *distContr // Collate the contributions this module makes to the dist. distContributions := &distContributions{} + distContributions.licenseMetadataFile = amod.licenseMetadataFile + // Iterate over this module's dist structs, merged from the dist and dists properties. for _, dist := range amod.Dists() { // Get the list of goals this dist should be enabled for. e.g. sdk, droidcore @@ -456,6 +460,10 @@ func generateDistContributionsForMake(distContributions *distContributions) []st for _, c := range d.copies { ret = append( ret, + fmt.Sprintf("$(if $(strip $(ALL_TARGETS.%s.META_LIC)),,$(eval ALL_TARGETS.%s.META_LIC := %s))\n", + c.from.String(), c.from.String(), distContributions.licenseMetadataFile.String())) + ret = append( + ret, fmt.Sprintf("$(call dist-for-goals,%s,%s:%s)\n", d.goals, c.from.String(), c.dest)) } } @@ -937,7 +945,10 @@ func shouldSkipAndroidMkProcessing(module *ModuleBase) bool { return !module.Enabled() || module.commonProperties.HideFromMake || // Make does not understand LinuxBionic - module.Os() == LinuxBionic + module.Os() == LinuxBionic || + // Make does not understand LinuxMusl, except when we are building with USE_HOST_MUSL=true + // and all host binaries are LinuxMusl + (module.Os() == LinuxMusl && module.Target().HostCross) } // A utility func to format LOCAL_TEST_DATA outputs. See the comments on DataPath to understand how |