Auto-fill ndkMigratedLibs.
Change-Id: Ifb91f62eccb17dedb71c1a9a0f5c1471edbcbd44
This commit is contained in:
parent
5c395b39b4
commit
7e9d295807
19
cc/cc.go
19
cc/cc.go
|
@ -43,6 +43,7 @@ func init() {
|
|||
android.RegisterBottomUpMutator("link", linkageMutator)
|
||||
android.RegisterBottomUpMutator("ndk_api", ndkApiMutator)
|
||||
android.RegisterBottomUpMutator("test_per_src", testPerSrcMutator)
|
||||
android.RegisterBottomUpMutator("begin", beginMutator)
|
||||
android.RegisterBottomUpMutator("deps", depsMutator)
|
||||
|
||||
android.RegisterTopDownMutator("asan_deps", sanitizerDepsMutator(asan))
|
||||
|
@ -527,7 +528,7 @@ func (c *Module) deps(ctx BaseModuleContext) Deps {
|
|||
return deps
|
||||
}
|
||||
|
||||
func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
||||
func (c *Module) beginMutator(actx android.BottomUpMutatorContext) {
|
||||
ctx := &baseModuleContext{
|
||||
BaseContext: actx,
|
||||
moduleContextImpl: moduleContextImpl{
|
||||
|
@ -537,6 +538,16 @@ func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
|||
ctx.ctx = ctx
|
||||
|
||||
c.begin(ctx)
|
||||
}
|
||||
|
||||
func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
||||
ctx := &baseModuleContext{
|
||||
BaseContext: actx,
|
||||
moduleContextImpl: moduleContextImpl{
|
||||
mod: c,
|
||||
},
|
||||
}
|
||||
ctx.ctx = ctx
|
||||
|
||||
deps := c.deps(ctx)
|
||||
|
||||
|
@ -623,6 +634,12 @@ func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
|||
{"ndk_api", version}, {"link", "shared"}}, ndkLateStubDepTag, variantLateNdkLibs...)
|
||||
}
|
||||
|
||||
func beginMutator(ctx android.BottomUpMutatorContext) {
|
||||
if c, ok := ctx.Module().(*Module); ok && c.Enabled() {
|
||||
c.beginMutator(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func depsMutator(ctx android.BottomUpMutatorContext) {
|
||||
if c, ok := ctx.Module().(*Module); ok && c.Enabled() {
|
||||
c.depsMutator(ctx)
|
||||
|
|
|
@ -164,6 +164,18 @@ func ndkApiMutator(mctx android.BottomUpMutatorContext) {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *stubCompiler) compilerInit(ctx BaseModuleContext) {
|
||||
c.baseCompiler.compilerInit(ctx)
|
||||
|
||||
name := strings.TrimSuffix(ctx.ModuleName(), ".ndk")
|
||||
for _, lib := range ndkMigratedLibs {
|
||||
if lib == name {
|
||||
return
|
||||
}
|
||||
}
|
||||
ndkMigratedLibs = append(ndkMigratedLibs, name)
|
||||
}
|
||||
|
||||
func (c *stubCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Paths {
|
||||
arch := ctx.Arch().ArchType.String()
|
||||
|
||||
|
|
Loading…
Reference in New Issue