Merge "Use the .cfi variant of a static library where needed."
This commit is contained in:
commit
061fcfc254
|
@ -1330,6 +1330,22 @@ $(call track-src-file-obj,$(asm_sources_asm),$(asm_objects_asm))
|
||||||
asm_objects += $(asm_objects_asm)
|
asm_objects += $(asm_objects_asm)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
## When compiling a CFI enabled target, use the .cfi variant of any
|
||||||
|
## static dependencies (where they exist).
|
||||||
|
##################################################################
|
||||||
|
define use_soong_cfi_static_libraries
|
||||||
|
$(foreach l,$(1),$(if $(filter $(l),$(SOONG_CFI_STATIC_LIBRARIES)),\
|
||||||
|
$(l).cfi,$(l)))
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifneq ($(filter cfi,$(my_sanitize)),)
|
||||||
|
my_whole_static_libraries := $(call use_soong_cfi_static_libraries,\
|
||||||
|
$(my_whole_static_libraries))
|
||||||
|
my_static_libraries := $(call use_soong_cfi_static_libraries,\
|
||||||
|
$(my_static_libraries))
|
||||||
|
endif
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## When compiling against the VNDK, use LL-NDK libraries
|
## When compiling against the VNDK, use LL-NDK libraries
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
|
@ -132,6 +132,12 @@ ifneq ($(filter mips mips64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)),)
|
||||||
my_sanitize_diag := $(filter-out cfi,$(my_sanitize_diag))
|
my_sanitize_diag := $(filter-out cfi,$(my_sanitize_diag))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Disable CFI for host targets
|
||||||
|
ifdef LOCAL_IS_HOST_MODULE
|
||||||
|
my_sanitize := $(filter-out cfi,$(my_sanitize))
|
||||||
|
my_sanitize_diag := $(filter-out cfi,$(my_sanitize_diag))
|
||||||
|
endif
|
||||||
|
|
||||||
# Support for local sanitize blacklist paths.
|
# Support for local sanitize blacklist paths.
|
||||||
ifneq ($(my_sanitize)$(my_global_sanitize),)
|
ifneq ($(my_sanitize)$(my_global_sanitize),)
|
||||||
ifneq ($(LOCAL_SANITIZE_BLACKLIST),)
|
ifneq ($(LOCAL_SANITIZE_BLACKLIST),)
|
||||||
|
|
Loading…
Reference in New Issue