From 2cec05d37bb52181e9360d0f30fd10b6321cdce8 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 30 Sep 2021 03:13:31 +0000 Subject: [PATCH] Revert "Export SOONG_CC_API_XML to Make outside androidmk" This reverts commit ebb32c486a9209cbe0933e2bd993b3b90dc3f800. Reason for revert: breaks coverage build (b/201600003) Bug: 193819970 Bug: 201600003 Change-Id: I65969c4a62165c40dded2794b757469909bf8ca6 --- cc/androidmk.go | 3 +++ cc/library.go | 6 ------ cc/stub_library.go | 12 ------------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/cc/androidmk.go b/cc/androidmk.go index e95d5a793..cd52363e8 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -294,6 +294,9 @@ func (library *libraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries if library.buildStubs() { entries.SetBool("LOCAL_NO_NOTICE_FILE", true) } + if library.apiListCoverageXmlPath.String() != "" { + entries.SetString("SOONG_CC_API_XML", "$(SOONG_CC_API_XML) "+library.apiListCoverageXmlPath.String()) + } }) } // If a library providing a stub is included in an APEX, the private APIs of the library diff --git a/cc/library.go b/cc/library.go index bbb0c754d..de9d01ede 100644 --- a/cc/library.go +++ b/cc/library.go @@ -1035,8 +1035,6 @@ type libraryInterface interface { androidMkWriteAdditionalDependenciesForSourceAbiDiff(w io.Writer) availableFor(string) bool - - getAPIListCoverageXMLPath() android.ModuleOutPath } type versionedInterface interface { @@ -1973,10 +1971,6 @@ func (library *libraryDecorator) makeUninstallable(mod *Module) { mod.ModuleBase.MakeUninstallable() } -func (library *libraryDecorator) getAPIListCoverageXMLPath() android.ModuleOutPath { - return library.apiListCoverageXmlPath -} - var versioningMacroNamesListKey = android.NewOnceKey("versioningMacroNamesList") // versioningMacroNamesList returns a singleton map, where keys are "version macro names", diff --git a/cc/stub_library.go b/cc/stub_library.go index 76da782ee..1722c8096 100644 --- a/cc/stub_library.go +++ b/cc/stub_library.go @@ -15,7 +15,6 @@ package cc import ( - "sort" "strings" "android/soong/android" @@ -28,8 +27,6 @@ func init() { type stubLibraries struct { stubLibraryMap map[string]bool - - apiListCoverageXmlPaths []string } // Check if the module defines stub, or itself is stub @@ -56,11 +53,6 @@ func (s *stubLibraries) GenerateBuildActions(ctx android.SingletonContext) { s.stubLibraryMap[name] = true } } - if m.library != nil { - if p := m.library.getAPIListCoverageXMLPath().String(); p != "" { - s.apiListCoverageXmlPaths = append(s.apiListCoverageXmlPaths, p) - } - } } }) } @@ -74,8 +66,4 @@ func stubLibrariesSingleton() android.Singleton { func (s *stubLibraries) MakeVars(ctx android.MakeVarsContext) { // Convert stub library file names into Makefile variable. ctx.Strict("STUB_LIBRARIES", strings.Join(android.SortedStringKeys(s.stubLibraryMap), " ")) - - // Export the list of API XML files to Make. - sort.Strings(s.apiListCoverageXmlPaths) - ctx.Strict("SOONG_CC_API_XML", strings.Join(s.apiListCoverageXmlPaths, " ")) }