From c9b88c9ffeca0669e0e413ec153f80be3881d54f Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 6 Feb 2025 17:58:26 -0800 Subject: Remove configurable values from providers Providers are data exported from one module to another. Configurable properties are the collection of all possible values of a property, to be resolved under the module's configuration. If you export a configurable from one module to another and then resolve it there, it will be evaluated with the wrong configuration. Bug: 394967253 Test: m nothing Change-Id: I934b08538bcc3267b3ec44925591f16a1c59292c --- rust/rust.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rust/rust.go') diff --git a/rust/rust.go b/rust/rust.go index 7880dee8c..2b1b45447 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -1202,10 +1202,11 @@ func (mod *Module) GenerateAndroidBuildActions(actx android.ModuleContext) { // Define the linker info if compiler != nil because Rust currently // does compilation and linking in one step. If this changes in the future, // move this as appropriate. + baseCompilerProps := mod.compiler.baseCompilerProps() ccInfo.LinkerInfo = &cc.LinkerInfo{ - WholeStaticLibs: mod.compiler.baseCompilerProps().Whole_static_libs, - StaticLibs: mod.compiler.baseCompilerProps().Static_libs, - SharedLibs: mod.compiler.baseCompilerProps().Shared_libs, + WholeStaticLibs: baseCompilerProps.Whole_static_libs.GetOrDefault(ctx, nil), + StaticLibs: baseCompilerProps.Static_libs.GetOrDefault(ctx, nil), + SharedLibs: baseCompilerProps.Shared_libs.GetOrDefault(ctx, nil), } android.SetProvider(ctx, cc.CcInfoProvider, ccInfo) -- cgit v1.2.3-59-g8ed1b