Auto-fill ndkMigratedLibs. am: 7e9d295807
am: cbfe300d8a
Change-Id: I84dd8f4d445be8e1c7af16cf1889a601344ca851
This commit is contained in:
19
cc/cc.go
19
cc/cc.go
@@ -43,6 +43,7 @@ func init() {
|
|||||||
android.RegisterBottomUpMutator("link", linkageMutator)
|
android.RegisterBottomUpMutator("link", linkageMutator)
|
||||||
android.RegisterBottomUpMutator("ndk_api", ndkApiMutator)
|
android.RegisterBottomUpMutator("ndk_api", ndkApiMutator)
|
||||||
android.RegisterBottomUpMutator("test_per_src", testPerSrcMutator)
|
android.RegisterBottomUpMutator("test_per_src", testPerSrcMutator)
|
||||||
|
android.RegisterBottomUpMutator("begin", beginMutator)
|
||||||
android.RegisterBottomUpMutator("deps", depsMutator)
|
android.RegisterBottomUpMutator("deps", depsMutator)
|
||||||
|
|
||||||
android.RegisterTopDownMutator("asan_deps", sanitizerDepsMutator(asan))
|
android.RegisterTopDownMutator("asan_deps", sanitizerDepsMutator(asan))
|
||||||
@@ -527,7 +528,7 @@ func (c *Module) deps(ctx BaseModuleContext) Deps {
|
|||||||
return deps
|
return deps
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
func (c *Module) beginMutator(actx android.BottomUpMutatorContext) {
|
||||||
ctx := &baseModuleContext{
|
ctx := &baseModuleContext{
|
||||||
BaseContext: actx,
|
BaseContext: actx,
|
||||||
moduleContextImpl: moduleContextImpl{
|
moduleContextImpl: moduleContextImpl{
|
||||||
@@ -537,6 +538,16 @@ func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
|||||||
ctx.ctx = ctx
|
ctx.ctx = ctx
|
||||||
|
|
||||||
c.begin(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)
|
deps := c.deps(ctx)
|
||||||
|
|
||||||
@@ -623,6 +634,12 @@ func (c *Module) depsMutator(actx android.BottomUpMutatorContext) {
|
|||||||
{"ndk_api", version}, {"link", "shared"}}, ndkLateStubDepTag, variantLateNdkLibs...)
|
{"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) {
|
func depsMutator(ctx android.BottomUpMutatorContext) {
|
||||||
if c, ok := ctx.Module().(*Module); ok && c.Enabled() {
|
if c, ok := ctx.Module().(*Module); ok && c.Enabled() {
|
||||||
c.depsMutator(ctx)
|
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 {
|
func (c *stubCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Paths {
|
||||||
arch := ctx.Arch().ArchType.String()
|
arch := ctx.Arch().ArchType.String()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user