Merge changes I17a96b97,Ib4412657,I73e6d479
* changes:
Build: Add module-level product configuration of sanitization
Build: Add option to restrict sanitization by owner
Build: Add option to restrict sanitization by architecture
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 10208b4..18b7478 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -80,17 +80,13 @@
# sanitized static libraries. That's OK, because the executable
# always depends on the ASan runtime library, which defines these
# symbols.
-ifneq ($(strip $(SANITIZE_TARGET)),)
+ifneq ($(filter address thread,$(strip $(SANITIZE_TARGET))),)
ifndef LOCAL_IS_HOST_MODULE
ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
ifeq ($(my_sanitize),)
my_allow_undefined_symbols := true
endif
endif
- # Workaround for a bug in AddressSanitizer that breaks stack unwinding.
- # https://code.google.com/p/address-sanitizer/issues/detail?id=387
- # Revert when external/compiler-rt is updated past r236014.
- LOCAL_PACK_MODULE_RELOCATIONS := false
endif
endif
@@ -126,7 +122,9 @@
my_cflags += -fsanitize-trap=all
my_cflags += -ftrap-function=abort
endif
- my_shared_libraries += libdl
+ ifneq ($(filter address thread,$(my_sanitize)),)
+ my_shared_libraries += libdl
+ endif
endif
endif
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 26042fa..1df25d2 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -411,9 +411,9 @@
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES)
ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true)
-$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib/$(TARGET_2ND_ARCH)
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib/$(TARGET_2ND_ARCH)
else
-$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(TARGET_OUT_VENDOR)/lib
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib
endif
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS)