From 6ef0d742df8fac26be3d4396b60c4332cf371b44 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Thu, 20 Mar 2025 18:31:54 +0000 Subject: Use provider to get outpath in getRequiredMemberOutputFile. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Iae0d301db244f9543e4da2d6bae01b3320e3a9e4 --- cc/library_sdk_member.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go index d1440eaad..46290300c 100644 --- a/cc/library_sdk_member.go +++ b/cc/library_sdk_member.go @@ -573,9 +573,8 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte func getRequiredMemberOutputFile(ctx android.SdkMemberContext, ccModule *Module) android.Path { var path android.Path - outputFile := ccModule.OutputFile() - if outputFile.Valid() { - path = outputFile.Path() + if info, ok := android.OtherModuleProvider(ctx.SdkModuleContext(), ccModule, LinkableInfoProvider); ok && info.OutputFile.Valid() { + path = info.OutputFile.Path() } else { ctx.SdkModuleContext().ModuleErrorf("member variant %s does not have a valid output file", ccModule) } -- cgit v1.2.3-59-g8ed1b