diff options
author | Jiyong Park <jiyong@google.com> | 2018-12-19 02:47:14 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2019-01-13 00:48:47 +0900 |
commit | 379de2fab01283c27a04404293a6ae06b00aac4b (patch) | |
tree | 144ec22b2f136b42410dedb7de449c0fbde38655 /cc/prebuilt.go | |
parent | 84af3624bb7af32ee2482952952aef08c410f70d (diff) | |
download | build_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 'cc/prebuilt.go')
-rw-r--r-- | cc/prebuilt.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/prebuilt.go b/cc/prebuilt.go index 47994a8c..ffeeb697 100644 --- a/cc/prebuilt.go +++ b/cc/prebuilt.go @@ -103,6 +103,10 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext, return nil } +func (p *prebuiltLibraryLinker) shared() bool { + return p.libraryDecorator.shared() +} + func prebuiltSharedLibraryFactory() android.Module { module, _ := NewPrebuiltSharedLibrary(android.HostAndDeviceSupported) return module.Init() @@ -121,6 +125,10 @@ func NewPrebuiltSharedLibrary(hod android.HostOrDeviceSupported) (*Module, *libr module.AddProperties(&prebuilt.properties) android.InitPrebuiltModule(module, &prebuilt.properties.Srcs) + + // Prebuilt libraries can be included in APEXes + android.InitApexModule(module) + return module, library } |