Add prebuilt ABI checker support to soong
This commit adds prebuilt ABI checker support to soong so that
`cc_prebuilt_library_shared` and `cc_prebuilt_binary` are checked.
To opt out the check, add `check_elf_files: false` to your module.
Bug: 119086738
Test: lunch aosp_sailfish-userdebug && CHECK_ELF_FILES=true make check-elf-files
Change-Id: Idb4290c8f48aad545894a7ae718a537cbf832233
diff --git a/cc/vndk_prebuilt.go b/cc/vndk_prebuilt.go
index 2d7274d..74f7f27 100644
--- a/cc/vndk_prebuilt.go
+++ b/cc/vndk_prebuilt.go
@@ -60,6 +60,10 @@
// Prebuilt files for each arch.
Srcs []string `android:"arch_variant"`
+
+ // Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined symbols,
+ // etc).
+ Check_elf_files *bool
}
type vndkPrebuiltLibraryDecorator struct {
@@ -155,6 +159,8 @@
libraryDecorator: library,
}
+ prebuilt.properties.Check_elf_files = BoolPtr(false)
+
module.compiler = nil
module.linker = prebuilt
module.installer = prebuilt