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/android/paths.go b/android/paths.go
index 037c98d..fe639e6 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -652,7 +652,10 @@
if ctx.Proprietary() {
partition = ctx.DeviceConfig().VendorPath()
}
- if ctx.InstallInData() {
+
+ if ctx.InstallInSanitizerDir() {
+ partition = "data/asan/" + partition
+ } else if ctx.InstallInData() {
partition = "data"
}
outPaths = []string{"target", "product", ctx.AConfig().DeviceName(), partition}