Refactor sanitized library on-disk layout - Make.
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: Ic6ba8e43e31df2ea92b85fd60f572823b6883ba2
This commit is contained in:
parent
4b4e203a0b
commit
b285c46bbd
2 changed files with 7 additions and 2 deletions
|
@ -410,6 +410,10 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*)
|
|||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib*)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor/lib*)
|
||||
|
||||
# Sanitized libraries now live in a different location.
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/lib*)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/vendor/lib*)
|
||||
|
||||
# ************************************************
|
||||
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||
# ************************************************
|
||||
|
|
|
@ -168,6 +168,7 @@ HOST_PREBUILT_TAG := $(BUILD_OS)-$(HOST_PREBUILT_ARCH)
|
|||
TARGET_COPY_OUT_SYSTEM := system
|
||||
TARGET_COPY_OUT_SYSTEM_OTHER := system_other
|
||||
TARGET_COPY_OUT_DATA := data
|
||||
TARGET_COPY_OUT_ASAN := $(TARGET_COPY_OUT_DATA)/asan
|
||||
TARGET_COPY_OUT_OEM := oem
|
||||
TARGET_COPY_OUT_ODM := odm
|
||||
TARGET_COPY_OUT_ROOT := root
|
||||
|
@ -393,7 +394,7 @@ TARGET_OUT_COMMON_GEN := $(TARGET_COMMON_OUT_ROOT)/gen
|
|||
|
||||
TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM)
|
||||
ifneq ($(filter address,$(SANITIZE_TARGET)),)
|
||||
target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
|
||||
target_out_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system
|
||||
else
|
||||
target_out_shared_libraries_base := $(TARGET_OUT)
|
||||
endif
|
||||
|
@ -473,7 +474,7 @@ TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
|
|||
|
||||
TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)
|
||||
ifneq ($(filter address,$(SANITIZE_TARGET)),)
|
||||
target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)/vendor
|
||||
target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/vendor
|
||||
else
|
||||
target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR)
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue