Don't export flags from SourceProvider variants

There is no need to export the linkdirs from the SourceProvider
variant.  Remove them to reduce differences in build.ninja from
a later patch that moves the flag exporting into compile(), which
isn't called by the SourceProvider variant.

Test: m checkbuild
Change-Id: I9c4d3a336a07cb9074376303bfa277c05d893b98
This commit is contained in:
Colin Cross 2020-09-23 16:49:23 -07:00
parent e4f6ebaf6c
commit d3e05caa47
1 changed files with 5 additions and 0 deletions

View File

@ -695,6 +695,11 @@ func (mod *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
if mod.compiler.(libraryInterface).source() {
mod.sourceProvider.GenerateSource(ctx, deps)
mod.sourceProvider.setSubName(ctx.ModuleSubDir())
if lib, ok := mod.compiler.(*libraryDecorator); ok {
lib.flagExporter.linkDirs = nil
lib.flagExporter.linkObjects = nil
lib.flagExporter.depFlags = nil
}
} else {
sourceMod := actx.GetDirectDepWithTag(mod.Name(), sourceDepTag)
sourceLib := sourceMod.(*Module).compiler.(*libraryDecorator)