Produce mappings of hashes to elf symbols and r8 dictionaries
Run the symbols_map tool on each unstripped binary and proguard
dictionary while copying it to produce a textproto that maps the
hash to the symbol/dictionary file location. Combine the textprotos
into a mapping file when producing the zipped build artifacts.
Bug: 218888599
Test: m dist
Change-Id: I78997e2f3b631ed74213903cc8e72415b2d7eee0
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index 006e1dc..d771d22 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -100,18 +100,24 @@
endif
ifdef LOCAL_SOONG_PROGUARD_DICT
+ my_proguard_dictionary_directory := $(local-proguard-dictionary-directory)
+ my_proguard_dictionary_mapping_directory := $(local-proguard-dictionary-mapping-directory)
$(eval $(call copy-one-file,$(LOCAL_SOONG_PROGUARD_DICT),\
$(intermediates.COMMON)/proguard_dictionary))
- $(eval $(call copy-one-file,$(LOCAL_SOONG_PROGUARD_DICT),\
- $(call local-packaging-dir,proguard_dictionary)/proguard_dictionary))
+ $(eval $(call copy-r8-dictionary-file-with-mapping,\
+ $(LOCAL_SOONG_PROGUARD_DICT),\
+ $(my_proguard_dictionary_directory)/proguard_dictionary,\
+ $(my_proguard_dictionary_mapping_directory)/proguard_dictionary.textproto))
$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),\
- $(call local-packaging-dir,proguard_dictionary)/classes.jar))
+ $(my_proguard_dictionary_directory)/classes.jar))
$(call add-dependency,$(LOCAL_BUILT_MODULE),\
$(intermediates.COMMON)/proguard_dictionary)
$(call add-dependency,$(LOCAL_BUILT_MODULE),\
- $(call local-packaging-dir,proguard_dictionary)/proguard_dictionary)
+ $(my_proguard_dictionary_directory)/proguard_dictionary)
$(call add-dependency,$(LOCAL_BUILT_MODULE),\
- $(call local-packaging-dir,proguard_dictionary)/classes.jar)
+ $(my_proguard_dictionary_mapping_directory)/proguard_dictionary.textproto)
+ $(call add-dependency,$(LOCAL_BUILT_MODULE),\
+ $(my_proguard_dictionary_directory)/classes.jar)
endif
ifdef LOCAL_SOONG_PROGUARD_USAGE_ZIP