Merge changes from topic "header_libs_requirement"
* changes: Add libstagefright_mp3dec_headers to allowed apex deps Require libraries in header_libs to be cc_library_header
This commit is contained in:
@@ -407,6 +407,7 @@ libstagefright_m4vh263dec(minSdkVersion:29)
|
|||||||
libstagefright_m4vh263enc(minSdkVersion:29)
|
libstagefright_m4vh263enc(minSdkVersion:29)
|
||||||
libstagefright_metadatautils(minSdkVersion:29)
|
libstagefright_metadatautils(minSdkVersion:29)
|
||||||
libstagefright_mp3dec(minSdkVersion:29)
|
libstagefright_mp3dec(minSdkVersion:29)
|
||||||
|
libstagefright_mp3dec_headers(minSdkVersion:29)
|
||||||
libstagefright_mpeg2extractor(minSdkVersion:29)
|
libstagefright_mpeg2extractor(minSdkVersion:29)
|
||||||
libstagefright_mpeg2support_nocrypto(minSdkVersion:29)
|
libstagefright_mpeg2support_nocrypto(minSdkVersion:29)
|
||||||
libstats_jni(minSdkVersion:(no version))
|
libstats_jni(minSdkVersion:(no version))
|
||||||
|
9
cc/cc.go
9
cc/cc.go
@@ -2411,7 +2411,14 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
|||||||
|
|
||||||
switch {
|
switch {
|
||||||
case libDepTag.header():
|
case libDepTag.header():
|
||||||
// nothing
|
if !ctx.OtherModuleHasProvider(dep, HeaderLibraryInfoProvider) {
|
||||||
|
if !ctx.Config().AllowMissingDependencies() {
|
||||||
|
ctx.ModuleErrorf("module %q is not a header library", depName)
|
||||||
|
} else {
|
||||||
|
ctx.AddMissingDependencies([]string{depName})
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
case libDepTag.shared():
|
case libDepTag.shared():
|
||||||
if !ctx.OtherModuleHasProvider(dep, SharedLibraryInfoProvider) {
|
if !ctx.OtherModuleHasProvider(dep, SharedLibraryInfoProvider) {
|
||||||
if !ctx.Config().AllowMissingDependencies() {
|
if !ctx.Config().AllowMissingDependencies() {
|
||||||
|
@@ -897,16 +897,22 @@ func (library *libraryDecorator) linkStatic(ctx ModuleContext,
|
|||||||
|
|
||||||
ctx.CheckbuildFile(outputFile)
|
ctx.CheckbuildFile(outputFile)
|
||||||
|
|
||||||
ctx.SetProvider(StaticLibraryInfoProvider, StaticLibraryInfo{
|
if library.static() {
|
||||||
StaticLibrary: outputFile,
|
ctx.SetProvider(StaticLibraryInfoProvider, StaticLibraryInfo{
|
||||||
ReuseObjects: library.reuseObjects,
|
StaticLibrary: outputFile,
|
||||||
Objects: library.objects,
|
ReuseObjects: library.reuseObjects,
|
||||||
|
Objects: library.objects,
|
||||||
|
|
||||||
TransitiveStaticLibrariesForOrdering: android.NewDepSetBuilder(android.TOPOLOGICAL).
|
TransitiveStaticLibrariesForOrdering: android.NewDepSetBuilder(android.TOPOLOGICAL).
|
||||||
Direct(outputFile).
|
Direct(outputFile).
|
||||||
Transitive(deps.TranstiveStaticLibrariesForOrdering).
|
Transitive(deps.TranstiveStaticLibrariesForOrdering).
|
||||||
Build(),
|
Build(),
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if library.header() {
|
||||||
|
ctx.SetProvider(HeaderLibraryInfoProvider, HeaderLibraryInfo{})
|
||||||
|
}
|
||||||
|
|
||||||
return outputFile
|
return outputFile
|
||||||
}
|
}
|
||||||
|
@@ -130,6 +130,13 @@ type StaticLibraryInfo struct {
|
|||||||
|
|
||||||
var StaticLibraryInfoProvider = blueprint.NewProvider(StaticLibraryInfo{})
|
var StaticLibraryInfoProvider = blueprint.NewProvider(StaticLibraryInfo{})
|
||||||
|
|
||||||
|
// HeaderLibraryInfo is a marker provider that identifies a module as a header library.
|
||||||
|
type HeaderLibraryInfo struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// HeaderLibraryInfoProvider is a marker provider that identifies a module as a header library.
|
||||||
|
var HeaderLibraryInfoProvider = blueprint.NewProvider(HeaderLibraryInfo{})
|
||||||
|
|
||||||
// FlagExporterInfo is a provider to propagate transitive library information
|
// FlagExporterInfo is a provider to propagate transitive library information
|
||||||
// pertaining to exported include paths and flags.
|
// pertaining to exported include paths and flags.
|
||||||
type FlagExporterInfo struct {
|
type FlagExporterInfo struct {
|
||||||
|
@@ -190,6 +190,12 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.header() {
|
||||||
|
ctx.SetProvider(HeaderLibraryInfoProvider, HeaderLibraryInfo{})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user