Merge "Allow sanitize attribute on cc_objects and propagate sanitize attributes into them."

This commit is contained in:
Peter Collingbourne 2019-09-27 19:31:13 +00:00 committed by Gerrit Code Review
commit bcb5ca006c
2 changed files with 3 additions and 2 deletions

View file

@ -52,8 +52,9 @@ type ObjectLinkerProperties struct {
// input to a cc_genrule module.
func ObjectFactory() android.Module {
module := newBaseModule(android.HostAndDeviceSupported, android.MultilibBoth)
module.sanitize = &sanitize{}
module.linker = &objectLinker{
baseLinker: NewBaseLinker(nil),
baseLinker: NewBaseLinker(module.sanitize),
}
module.compiler = NewBaseCompiler()

View file

@ -674,7 +674,7 @@ func (sanitize *sanitize) isSanitizerEnabled(t sanitizerType) bool {
func isSanitizableDependencyTag(tag blueprint.DependencyTag) bool {
t, ok := tag.(dependencyTag)
return ok && t.library || t == reuseObjTag
return ok && t.library || t == reuseObjTag || t == objDepTag
}
// Propagate sanitizer requirements down from binaries