Simplify missing whole_static_libs checking
Whole_static_libs required custom error checking when AllowMissingDependencies was set because it could end up depending on an empty list of objects, which would leave nothing in the dependency tree that had been replaced with an ErrorRule. Reuse the prebuilts case to depend on the .a file when there are no objects and remove the custom error handling. Test: TestEmptyWholeStaticLibsAllowMissingDependencies Change-Id: Ic3216235f7e5ae8b5b6ab31ef2ca35c3994d82aa
This commit is contained in:
@@ -338,10 +338,6 @@ type libraryDecorator struct {
|
||||
flagExporter
|
||||
stripper Stripper
|
||||
|
||||
// If we're used as a whole_static_lib, our missing dependencies need
|
||||
// to be given
|
||||
wholeStaticMissingDeps []string
|
||||
|
||||
// For whole_static_libs
|
||||
objects Objects
|
||||
|
||||
@@ -682,7 +678,6 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
|
||||
}
|
||||
|
||||
type libraryInterface interface {
|
||||
getWholeStaticMissingDeps() []string
|
||||
static() bool
|
||||
shared() bool
|
||||
objs() Objects
|
||||
@@ -889,8 +884,6 @@ func (library *libraryDecorator) linkStatic(ctx ModuleContext,
|
||||
|
||||
library.coverageOutputFile = TransformCoverageFilesToZip(ctx, library.objects, ctx.ModuleName())
|
||||
|
||||
library.wholeStaticMissingDeps = ctx.GetMissingDependencies()
|
||||
|
||||
ctx.CheckbuildFile(outputFile)
|
||||
|
||||
return outputFile
|
||||
@@ -1182,10 +1175,6 @@ func (library *libraryDecorator) buildShared() bool {
|
||||
BoolDefault(library.SharedProperties.Shared.Enabled, true)
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) getWholeStaticMissingDeps() []string {
|
||||
return append([]string(nil), library.wholeStaticMissingDeps...)
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) objs() Objects {
|
||||
return library.objects
|
||||
}
|
||||
|
Reference in New Issue
Block a user