From 1dd88392869fc72463553b65537e5f8d8e33c118 Mon Sep 17 00:00:00 2001 From: Vishwath Mohan Date: Wed, 29 Mar 2017 22:00:18 -0700 Subject: 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 --- cc/cc.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'cc/cc.go') diff --git a/cc/cc.go b/cc/cc.go index b107d015..6f5539f7 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -212,6 +212,7 @@ type installer interface { installerProps() []interface{} install(ctx ModuleContext, path android.Path) inData() bool + inSanitizerDir() bool hostToolPath() android.OptionalPath } @@ -993,10 +994,17 @@ func (c *Module) InstallInData() bool { if c.installer == nil { return false } - if c.sanitize != nil && c.sanitize.inData() { + return c.installer.inData() +} + +func (c *Module) InstallInSanitizerDir() bool { + if c.installer == nil { + return false + } + if c.sanitize != nil && c.sanitize.inSanitizerDir() { return true } - return c.installer.inData() + return c.installer.inSanitizerDir() } func (c *Module) HostToolPath() android.OptionalPath { -- cgit v1.2.3