Refactor sanitized library on-disk layout - Soong.
This CL moves the location of ASAN-ified libraries on disk in the following manner: /data/lib* --> /data/asan/system/lib* /data/vendor/* --> /data/asan/vendor/* There are a couple of advantages to this, including better isolation from other components, and more transparent linker renaming and SELinux policies. Bug: 36574794 Bug: 36674745 Test: m -j40 && SANITIZE_TARGET="address" m -j40 and the device boots. All sanitized libraries are correctly located in /data/asan/*. Change-Id: I06bf459260ec451d4495a02562f640ad622f34c2
This commit is contained in:
committed by
Colin Cross
parent
c31994825a
commit
1dd8839286
@@ -97,7 +97,7 @@ type SanitizeProperties struct {
|
||||
|
||||
SanitizerEnabled bool `blueprint:"mutated"`
|
||||
SanitizeDep bool `blueprint:"mutated"`
|
||||
InData bool `blueprint:"mutated"`
|
||||
InSanitizerDir bool `blueprint:"mutated"`
|
||||
}
|
||||
|
||||
type sanitize struct {
|
||||
@@ -383,8 +383,8 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
return flags
|
||||
}
|
||||
|
||||
func (sanitize *sanitize) inData() bool {
|
||||
return sanitize.Properties.InData
|
||||
func (sanitize *sanitize) inSanitizerDir() bool {
|
||||
return sanitize.Properties.InSanitizerDir
|
||||
}
|
||||
|
||||
func (sanitize *sanitize) Sanitizer(t sanitizerType) bool {
|
||||
@@ -447,7 +447,7 @@ func sanitizerMutator(t sanitizerType) func(android.BottomUpMutatorContext) {
|
||||
modules[0].(*Module).sanitize.Properties.SanitizeDep = false
|
||||
modules[1].(*Module).sanitize.Properties.SanitizeDep = false
|
||||
if mctx.Device() {
|
||||
modules[1].(*Module).sanitize.Properties.InData = true
|
||||
modules[1].(*Module).sanitize.Properties.InSanitizerDir = true
|
||||
} else {
|
||||
modules[0].(*Module).Properties.PreventInstall = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user