From f22120fb1da7f75a571966124bb0da6a57fd4f07 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Thu, 13 Mar 2025 18:36:35 +0000 Subject: Change CommonModuleInfoProvider to a pointer. Bug: 358427516 Test: Manually verified genereated ninja and mk files, unit tests. Change-Id: I53a6dd718232735decbeb93febfd269dd9449e86 --- rust/rust.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rust/rust.go') diff --git a/rust/rust.go b/rust/rust.go index 5f3d7a922..54b5d92e3 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -1480,10 +1480,10 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { rustInfo, hasRustInfo := android.OtherModuleProvider(ctx, dep, RustInfoProvider) ccInfo, _ := android.OtherModuleProvider(ctx, dep, cc.CcInfoProvider) linkableInfo, hasLinkableInfo := android.OtherModuleProvider(ctx, dep, cc.LinkableInfoProvider) - commonInfo := android.OtherModuleProviderOrDefault(ctx, dep, android.CommonModuleInfoProvider) + commonInfo := android.OtherModulePointerProviderOrDefault(ctx, dep, android.CommonModuleInfoProvider) if hasRustInfo && !linkableInfo.Static && !linkableInfo.Shared { //Handle Rust Modules - makeLibName := rustMakeLibName(rustInfo, linkableInfo, &commonInfo, depName+rustInfo.RustSubName) + makeLibName := rustMakeLibName(rustInfo, linkableInfo, commonInfo, depName+rustInfo.RustSubName) switch { case depTag == dylibDepTag: @@ -1628,7 +1628,7 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { } } else if hasLinkableInfo { //Handle C dependencies - makeLibName := cc.MakeLibName(ccInfo, linkableInfo, &commonInfo, depName) + makeLibName := cc.MakeLibName(ccInfo, linkableInfo, commonInfo, depName) if !hasRustInfo { if commonInfo.Target.Os != ctx.Os() { ctx.ModuleErrorf("OS mismatch between %q and %q", ctx.ModuleName(), depName) -- cgit v1.2.3-59-g8ed1b