Merge "Support injecting boringssl hash in Make" am: 354dcef215

am: 6676057eec

Change-Id: I9db433ace89736a42c49c324fc9addab8bd7439d
This commit is contained in:
Colin Cross 2019-09-05 21:38:19 -07:00 committed by android-build-merger
commit f6b47af2d0
2 changed files with 15 additions and 2 deletions

View file

@ -115,6 +115,7 @@ LOCAL_HEADER_LIBRARIES:=
LOCAL_HOST_PREFIX:= LOCAL_HOST_PREFIX:=
LOCAL_HOST_REQUIRED_MODULES:= LOCAL_HOST_REQUIRED_MODULES:=
LOCAL_INIT_RC:= LOCAL_INIT_RC:=
LOCAL_INJECT_BSSL_HASH:=
LOCAL_INSTALLED_MODULE:= LOCAL_INSTALLED_MODULE:=
LOCAL_INSTALLED_MODULE_STEM:= LOCAL_INSTALLED_MODULE_STEM:=
LOCAL_INSTRUMENTATION_FOR:= LOCAL_INSTRUMENTATION_FOR:=

View file

@ -39,6 +39,17 @@ include $(BUILD_SYSTEM)/use_lld_setup.mk
include $(BUILD_SYSTEM)/binary.mk include $(BUILD_SYSTEM)/binary.mk
################################### ###################################
ifdef LOCAL_INJECT_BSSL_HASH
inject_module := $(intermediates)/INJECT_BSSL_HASH/$(notdir $(my_installed_module_stem))
LOCAL_INTERMEDIATE_TARGETS += $(inject_module)
$(inject_module): $(SOONG_HOST_OUT)/bin/bssl_inject_hash
$(inject_module): $(linked_module)
@echo "target inject BSSL hash: $(PRIVATE_MODULE) ($@)"
$(SOONG_HOST_OUT)/bin/bssl_inject_hash -in-object $< -o $@
else
inject_module := $(linked_module)
endif
########################################################### ###########################################################
## Store a copy with symbols for symbolic debugging ## Store a copy with symbols for symbolic debugging
########################################################### ###########################################################
@ -47,7 +58,7 @@ my_unstripped_path := $(TARGET_OUT_UNSTRIPPED)/$(patsubst $(PRODUCT_OUT)/%,%,$(m
else else
my_unstripped_path := $(LOCAL_UNSTRIPPED_PATH) my_unstripped_path := $(LOCAL_UNSTRIPPED_PATH)
endif endif
symbolic_input := $(linked_module) symbolic_input := $(inject_module)
symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem) symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem)
$(symbolic_output) : $(symbolic_input) $(symbolic_output) : $(symbolic_input)
@echo "target Symbolic: $(PRIVATE_MODULE) ($@)" @echo "target Symbolic: $(PRIVATE_MODULE) ($@)"
@ -59,7 +70,7 @@ $(symbolic_output) : $(symbolic_input)
ifeq ($(BREAKPAD_GENERATE_SYMBOLS),true) ifeq ($(BREAKPAD_GENERATE_SYMBOLS),true)
my_breakpad_path := $(TARGET_OUT_BREAKPAD)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path)) my_breakpad_path := $(TARGET_OUT_BREAKPAD)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
breakpad_input := $(linked_module) breakpad_input := $(inject_module)
breakpad_output := $(my_breakpad_path)/$(my_installed_module_stem).sym breakpad_output := $(my_breakpad_path)/$(my_installed_module_stem).sym
$(breakpad_output) : $(breakpad_input) | $(BREAKPAD_DUMP_SYMS) $(PRIVATE_READELF) $(breakpad_output) : $(breakpad_input) | $(BREAKPAD_DUMP_SYMS) $(PRIVATE_READELF)
@echo "target breakpad: $(PRIVATE_MODULE) ($@)" @echo "target breakpad: $(PRIVATE_MODULE) ($@)"
@ -133,6 +144,7 @@ endif # my_strip_module
$(cleantarget): PRIVATE_CLEAN_FILES += \ $(cleantarget): PRIVATE_CLEAN_FILES += \
$(linked_module) \ $(linked_module) \
$(inject_module) \
$(breakpad_output) \ $(breakpad_output) \
$(symbolic_output) \ $(symbolic_output) \
$(strip_output) $(strip_output)