From c71f79e3ffeeda47a6c2d816fc757440453e517e Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 5 Dec 2023 20:20:24 +0000 Subject: [PATCH] cc: export LOCAL_ACONFIG_FILES for printflags Bug: 308625757 Test: manual Change-Id: I211fe4736098bdca040c2a58b8b5e468c9d2e542 --- cc/androidmk.go | 2 ++ cc/cc.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/cc/androidmk.go b/cc/androidmk.go index ed13e5e99..224ea9623 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -133,6 +133,8 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries { entries.SetString("SOONG_SDK_VARIANT_MODULES", "$(SOONG_SDK_VARIANT_MODULES) $(patsubst %.sdk,%,$(LOCAL_MODULE))") } + // TODO(b/311155208): The container here should be system. + entries.SetOptionalPaths("LOCAL_ACONFIG_FILES", c.getTransitiveAconfigFiles("")) }, }, ExtraFooters: []android.AndroidMkExtraFootersFunc{ diff --git a/cc/cc.go b/cc/cc.go index 2e42761c4..6d8ca9022 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -2344,6 +2344,10 @@ func (c *Module) maybeUnhideFromMake() { } } +func (c *Module) getTransitiveAconfigFiles(container string) []android.Path { + return c.transitiveAconfigFiles[container].ToList() +} + // maybeInstall is called at the end of both GenerateAndroidBuildActions and // ProcessBazelQueryResponse to run the install hooks for installable modules, // like binaries and tests.