diff options
Diffstat (limited to 'core/binary.mk')
-rw-r--r-- | core/binary.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/binary.mk b/core/binary.mk index 3a53e48..1fdf9f5 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -164,6 +164,8 @@ endif ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true) my_clang := true + # Frame pointer based unwinder in ASan requires ARM frame setup. + LOCAL_ARM_MODE := arm my_cflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS) my_ldflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS) my_shared_libraries += $(ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES) @@ -474,6 +476,9 @@ proto_generated_obj_dir := $(intermediates)/proto proto_generated_objects := $(addprefix $(proto_generated_obj_dir)/, \ $(patsubst %.proto,%.pb.o,$(proto_sources_fullpath))) +# Auto-export the generated proto source dir. +LOCAL_EXPORT_C_INCLUDE_DIRS += $(proto_generated_cc_sources_dir) + # Ensure the transform-proto-to-cc rule is only defined once in multilib build. ifndef $(my_prefix)_$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_proto_defined $(proto_generated_cc_sources): PRIVATE_PROTO_INCLUDES := $(TOP) @@ -954,7 +959,8 @@ $(LOCAL_INSTALLED_MODULE): | $(installed_static_library_notice_file_targets) ########################################################### export_includes := $(intermediates)/export_includes $(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS) -$(export_includes) : $(LOCAL_MODULE_MAKEFILE) +# Make sure .pb.h are already generated before any dependent source files get compiled. +$(export_includes) : $(LOCAL_MODULE_MAKEFILE) $(proto_generated_headers) @echo Export includes file: $< -- $@ $(hide) mkdir -p $(dir $@) && rm -f $@ ifdef LOCAL_EXPORT_C_INCLUDE_DIRS |