From bf140974b2ca890da5df61238bcc09af4cd10521 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Tue, 30 Jun 2015 14:02:02 -0700 Subject: [PATCH] Move sanitized vendor libraries to /data/vendor/lib(|64). Sanitized RPATH now mentions /system/vendor/lib to preserve overlay in the case when a sanitized version of a vendor library can not be built. Bug: 22199458 Change-Id: I3222d2e1d6c08fdd1e0404fcb7db347aa4a92bb7 --- core/clang/TARGET_arm.mk | 2 +- core/clang/TARGET_arm64.mk | 2 +- core/envsetup.mk | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/clang/TARGET_arm.mk b/core/clang/TARGET_arm.mk index 1b130986ab..cd256049a5 100644 --- a/core/clang/TARGET_arm.mk +++ b/core/clang/TARGET_arm.mk @@ -69,4 +69,4 @@ $(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.p # Address sanitizer clang config $(clang_2nd_arch_prefix)ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan-arm-android -$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_RPATH := /data/lib +$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_RPATH := /data/vendor/lib:/$(TARGET_COPY_OUT_VENDOR)/lib:/data/lib diff --git a/core/clang/TARGET_arm64.mk b/core/clang/TARGET_arm64.mk index 7900f93e51..0861568a7d 100644 --- a/core/clang/TARGET_arm64.mk +++ b/core/clang/TARGET_arm64.mk @@ -67,4 +67,4 @@ TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-aarch64-android.a # Address sanitizer clang config ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan-arm64-android -ADDRESS_SANITIZER_RPATH := /data/lib64 +ADDRESS_SANITIZER_RPATH := /data/vendor/lib64:/$(TARGET_COPY_OUT_VENDOR)/lib64:/data/lib64 diff --git a/core/envsetup.mk b/core/envsetup.mk index 688e6a492e..962d269f86 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -332,12 +332,18 @@ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/ TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) +ifeq ($(SANITIZE_TARGET),address) +target_out_vendor_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)/vendor +else +target_out_vendor_shared_libraries_base := $(TARGET_OUT_VENDOR) +endif + TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR)/bin TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES := $(TARGET_OUT_VENDOR)/xbin ifeq ($(TARGET_IS_64_BIT),true) -TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib64 +TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib64 else -TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib +TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib endif TARGET_OUT_VENDOR_JAVA_LIBRARIES := $(TARGET_OUT_VENDOR)/framework TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR)/app