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
diff --git a/cc/installer.go b/cc/installer.go
index 64f87d9..c4de589 100644
--- a/cc/installer.go
+++ b/cc/installer.go
@@ -30,8 +30,9 @@
type installLocation int
const (
- InstallInSystem installLocation = 0
- InstallInData = iota
+ InstallInSystem installLocation = 0
+ InstallInData = iota
+ InstallInSanitizerDir = iota
)
func NewBaseInstaller(dir, dir64 string, location installLocation) *baseInstaller {
@@ -78,6 +79,10 @@
return installer.location == InstallInData
}
+func (installer *baseInstaller) inSanitizerDir() bool {
+ return installer.location == InstallInSanitizerDir
+}
+
func (installer *baseInstaller) hostToolPath() android.OptionalPath {
return android.OptionalPath{}
}