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
diff --git a/rust/rust.go b/rust/rust.go
index 22b81f1..1f8b904 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -695,6 +695,11 @@
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)