From d3e05caa477e03767de1baf1e30f9cabbf7e232b Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 23 Sep 2020 16:49:23 -0700 Subject: [PATCH] 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 --- rust/rust.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rust/rust.go b/rust/rust.go index 22b81f135..1f8b904d3 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -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)