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
diff --git a/cc/library.go b/cc/library.go
index e2b4d4f..bbff49a 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1893,6 +1893,10 @@
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
}