aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2018-12-19 02:47:14 +0900
committerJiyong Park <jiyong@google.com>2019-01-13 00:48:47 +0900
commit379de2fab01283c27a04404293a6ae06b00aac4b (patch)
tree144ec22b2f136b42410dedb7de449c0fbde38655 /apex
parent84af3624bb7af32ee2482952952aef08c410f70d (diff)
downloadbuild_soong-379de2fab01283c27a04404293a6ae06b00aac4b.tar.gz
build_soong-379de2fab01283c27a04404293a6ae06b00aac4b.tar.bz2
build_soong-379de2fab01283c27a04404293a6ae06b00aac4b.zip
APEXes can be sanitized
This change first introduces the interface "Sanitizeable" that module types other than cc.Module can use to be handled by the sanitizer mutator. APEX module, by implementing the interface, gets sanitizer variants. In doing so, sanitizer.go is refactored so that modules have explicit dependencies to the runtime sanitizer libraries. This allows the runtime library to be packaged into the APEX when required. This also completes the dependency graph; updating the prebuilt sanitizer runtime will trigger rebuilding of modules using the runtime. Bug: 120894259 Bug: 121038155 Test: SANITIZE_TARGET=hwaddress m apex.test Test: TARGET_FLATTEN_APEX=true SANITIZE_TARGET=address m Change-Id: Ia91576ff48cda3c996350308b75bf83fcf7c23d7
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/apex/apex.go b/apex/apex.go
index e711c8bb..62698681 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -482,6 +482,11 @@ func (a *apexBundle) getImageVariation(config android.DeviceConfig) string {
}
}
+func (a *apexBundle) IsSanitizerEnabled() bool {
+ // APEX can be mutated for sanitizers
+ return true
+}
+
func getCopyManifestForNativeLibrary(cc *cc.Module) (fileToCopy android.Path, dirInApex string) {
// Decide the APEX-local directory by the multilib of the library
// In the future, we may query this to the module.
@@ -903,6 +908,9 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD
fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)")
for _, fi := range a.filesInfo {
+ if cc, ok := fi.module.(*cc.Module); ok && cc.Properties.HideFromMake {
+ continue
+ }
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
fmt.Fprintln(w, "LOCAL_MODULE :=", fi.moduleName)