summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2025-02-05 02:22:33 +0000
committer Ivan Lozano <ivanlozano@google.com> 2025-02-05 03:13:10 +0000
commit7fe65ca1fe21ee107fa7c59fd21eb7ce8bac0bd6 (patch)
treebe540269a26e3c95a8b670e113f744bf35fb6322 /rust/rust.go
parent1f10f684516b131b5e6aebdf9b7915cf07409510 (diff)
rust: Rename flag providers for clarity
Rename the Rust flag and export info providers to make it more clear when workign with the Rust exporter vs the cc exporter. Also renames a test for additional clarity. Test: m blueprint_tests Change-Id: I652b55ef000a2cd00f47b1dbfe86713c33ae9d63
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/rust.go b/rust/rust.go
index f4fda2224..b1880cf57 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -573,8 +573,8 @@ func (flagExporter *flagExporter) exportWholeStaticLibs(flags ...string) {
flagExporter.wholeStaticLibObjects = android.FirstUniqueStrings(append(flagExporter.wholeStaticLibObjects, flags...))
}
-func (flagExporter *flagExporter) setProvider(ctx ModuleContext) {
- android.SetProvider(ctx, FlagExporterInfoProvider, FlagExporterInfo{
+func (flagExporter *flagExporter) setRustProvider(ctx ModuleContext) {
+ android.SetProvider(ctx, RustFlagExporterInfoProvider, RustFlagExporterInfo{
LinkDirs: flagExporter.linkDirs,
RustLibObjects: flagExporter.rustLibPaths,
StaticLibObjects: flagExporter.staticLibObjects,
@@ -589,7 +589,7 @@ func NewFlagExporter() *flagExporter {
return &flagExporter{}
}
-type FlagExporterInfo struct {
+type RustFlagExporterInfo struct {
Flags []string
LinkDirs []string
RustLibObjects []string
@@ -598,7 +598,7 @@ type FlagExporterInfo struct {
SharedLibPaths []string
}
-var FlagExporterInfoProvider = blueprint.NewProvider[FlagExporterInfo]()
+var RustFlagExporterInfoProvider = blueprint.NewProvider[RustFlagExporterInfo]()
func (mod *Module) isCoverageVariant() bool {
return mod.coverage.Properties.IsCoverageVariant
@@ -1573,7 +1573,7 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
directSrcProvidersDeps = append(directSrcProvidersDeps, &dep)
}
- exportedInfo, _ := android.OtherModuleProvider(ctx, dep, FlagExporterInfoProvider)
+ exportedInfo, _ := android.OtherModuleProvider(ctx, dep, RustFlagExporterInfoProvider)
//Append the dependencies exported objects, except for proc-macros which target a different arch/OS
if depTag != procMacroDepTag {