From f1f276c9049aa9db2f8827b6643228bf98732653 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Chen Date: Mon, 11 Mar 2024 20:02:34 +0800 Subject: [PATCH] Let header ABI checker load core variants' version scripts Header ABI checker dumps the ABI from core variants and filters it by version scripts. Ideally it should load different version scripts for LLNDK, NDK, APEX, etc, but the build rules have not been completed. The current solution is to load core variants' version scripts. It works for every existing library because a library's variants share one version script. Test: make Bug: 329078703 Change-Id: I4e26275e24daf93c7d3bb7e70b542a1197ae2129 --- cc/library.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cc/library.go b/cc/library.go index e2b4d4f4b..bbff49a68 100644 --- a/cc/library.go +++ b/cc/library.go @@ -1893,6 +1893,10 @@ func (library *libraryDecorator) symbolFileForAbiCheck(ctx ModuleContext) *strin if library.hasStubsVariants() && library.Properties.Stubs.Symbol_file != nil { return library.Properties.Stubs.Symbol_file } + // TODO(b/309880485): Distinguish platform, NDK, LLNDK, and APEX version scripts. + if library.baseLinker.Properties.Version_script != nil { + return library.baseLinker.Properties.Version_script + } return nil }