Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c54aa6db authored by Jihoon Kang's avatar Jihoon Kang
Browse files

Generate symbols mapping files for jni libs

Currently, the symbols files of the jni libs are copied to the symbols
directory, but its elf mapping files are not generated. This change
modifies this behavior so that the symbols coverage is increased.

Test: CI
Bug: 402471392
Change-Id: I00a62769b61fb5f72c54743873c8a6b53cd238d0
parent d8ee6f9d
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -142,7 +142,19 @@ endif
# install symbol files of JNI libraries
my_jni_lib_symbols_copy_files := $(foreach f,$(LOCAL_SOONG_JNI_LIBS_SYMBOLS),\
  $(call word-colon,1,$(f)):$(patsubst $(PRODUCT_OUT)/%,$(TARGET_OUT_UNSTRIPPED)/%,$(call word-colon,2,$(f))))
$(LOCAL_BUILT_MODULE): | $(call copy-many-files, $(my_jni_lib_symbols_copy_files))

$(foreach f, $(my_jni_lib_symbols_copy_files), \
  $(eval $(call copy-unstripped-elf-file-with-mapping, \
    $(call word-colon,1,$(f)), \
    $(call word-colon,2,$(f)), \
    $(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(call word-colon,2,$(f)).textproto)\
  ))\
)

symbolic_outputs := $(foreach f,$(my_jni_lib_symbols_copy_files),$(call word-colon,2,$(f)))
symbolic_mappings := $(foreach f,$(symbolic_outputs),$(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(f).textproto))

$(LOCAL_BUILT_MODULE): | $(symbolic_outputs)

# embedded JNI will already have been handled by soong
my_embed_jni :=