Add filegroup support to notice property.
Also, replace all notice file references with the parent directory pattern(../) with filegroups. Bug: 118899640 Test: Manual build Change-Id: I841345d747f41a3bb5beea66ad87a979734c39a4
This commit is contained in:
parent
6028c3bdf4
commit
ff7a1a47d9
|
@ -435,7 +435,7 @@ toolchain_library {
|
||||||
src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib/libwinpthread.a",
|
src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib/libwinpthread.a",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
notice: "../../prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/licenses/mingw-w64-svn-r5861/mingw-w64-libraries/winpthreads/COPYING",
|
notice: ":mingw-libwinpthread-notice",
|
||||||
}
|
}
|
||||||
|
|
||||||
toolchain_library {
|
toolchain_library {
|
||||||
|
|
|
@ -277,8 +277,8 @@ func translateAndroidModule(ctx SingletonContext, w io.Writer, mod blueprint.Mod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if amod.commonProperties.Notice != nil {
|
if amod.noticeFile != nil {
|
||||||
fmt.Fprintln(&data.preamble, "LOCAL_NOTICE_FILE :=", "$(LOCAL_PATH)/"+*amod.commonProperties.Notice)
|
fmt.Fprintln(&data.preamble, "LOCAL_NOTICE_FILE :=", amod.noticeFile.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if host {
|
if host {
|
||||||
|
|
|
@ -441,6 +441,7 @@ type ModuleBase struct {
|
||||||
noAddressSanitizer bool
|
noAddressSanitizer bool
|
||||||
installFiles Paths
|
installFiles Paths
|
||||||
checkbuildFiles Paths
|
checkbuildFiles Paths
|
||||||
|
noticeFile Path
|
||||||
|
|
||||||
// Used by buildTargetSingleton to create checkbuild and per-directory build targets
|
// Used by buildTargetSingleton to create checkbuild and per-directory build targets
|
||||||
// Only set on the final variant of each module
|
// Only set on the final variant of each module
|
||||||
|
@ -789,6 +790,11 @@ func (a *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
|
||||||
|
|
||||||
a.installFiles = append(a.installFiles, ctx.installFiles...)
|
a.installFiles = append(a.installFiles, ctx.installFiles...)
|
||||||
a.checkbuildFiles = append(a.checkbuildFiles, ctx.checkbuildFiles...)
|
a.checkbuildFiles = append(a.checkbuildFiles, ctx.checkbuildFiles...)
|
||||||
|
|
||||||
|
if a.commonProperties.Notice != nil {
|
||||||
|
// For filegroup-based notice file references.
|
||||||
|
a.noticeFile = ctx.ExpandSource(*a.commonProperties.Notice, "notice")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if a == ctx.FinalModule().(Module).base() {
|
if a == ctx.FinalModule().(Module).base() {
|
||||||
|
|
|
@ -207,6 +207,11 @@ func (mutator *mutator) Parallel() MutatorHandle {
|
||||||
func depsMutator(ctx BottomUpMutatorContext) {
|
func depsMutator(ctx BottomUpMutatorContext) {
|
||||||
if m, ok := ctx.Module().(Module); ok && m.Enabled() {
|
if m, ok := ctx.Module().(Module); ok && m.Enabled() {
|
||||||
m.DepsMutator(ctx)
|
m.DepsMutator(ctx)
|
||||||
|
|
||||||
|
// For filegroup-based notice file references.
|
||||||
|
if m.base().commonProperties.Notice != nil {
|
||||||
|
ExtractSourceDeps(ctx, m.base().commonProperties.Notice)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue