Merge changes from topic "install" am: 4acb77e76a am: 789fc863bb am: 42bd16e072

am: 0c8f7bd16c

Change-Id: I9b473e2a13cf1507d46e6fb6b4fe6114d6bacf22
This commit is contained in:
Colin Cross
2019-10-03 15:26:13 -07:00
committed by android-build-merger
11 changed files with 88 additions and 70 deletions

View File

@@ -350,11 +350,10 @@ func (installer *baseInstaller) AndroidMk(ctx AndroidMkContext, ret *android.And
}
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
path := installer.path.RelPathString()
dir, file := filepath.Split(path)
path, file := filepath.Split(installer.path.ToMakePath().String())
stem, suffix, _ := android.SplitFileExt(file)
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+suffix)
fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Clean(dir))
fmt.Fprintln(w, "LOCAL_MODULE_PATH := "+path)
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
})
}
@@ -395,12 +394,11 @@ func (c *vndkPrebuiltLibraryDecorator) AndroidMk(ctx AndroidMkContext, ret *andr
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
c.libraryDecorator.androidMkWriteExportedFlags(w)
path := c.path.RelPathString()
dir, file := filepath.Split(path)
path, file := filepath.Split(c.path.ToMakePath().String())
stem, suffix, ext := android.SplitFileExt(file)
fmt.Fprintln(w, "LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE)"+ext)
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+suffix)
fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Clean(dir))
fmt.Fprintln(w, "LOCAL_MODULE_PATH := "+path)
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
})
}

View File

@@ -129,6 +129,18 @@ func (p *vndkPrebuiltLibraryDecorator) singleSourcePath(ctx ModuleContext) andro
func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
flags Flags, deps PathDeps, objs Objects) android.Path {
arches := ctx.DeviceConfig().Arches()
if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
ctx.Module().SkipInstall()
return nil
}
if ctx.DeviceConfig().BinderBitness() != p.binderBit() {
ctx.Module().SkipInstall()
return nil
}
if len(p.properties.Srcs) > 0 && p.shared() {
p.libraryDecorator.exportIncludes(ctx)
p.libraryDecorator.reexportSystemDirs(p.properties.Export_system_include_dirs...)
@@ -136,6 +148,8 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
// current VNDK prebuilts are only shared libs.
return p.singleSourcePath(ctx)
}
ctx.Module().SkipInstall()
return nil
}