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

Commit 5e84999e authored by Jihoon Kang's avatar Jihoon Kang
Browse files

Do not generate symbols for make prebuilt module

Make source module does not generate symbols file. This change makes
the behavior consistent between the make source module and the make
prebuilt module. Note that Soong module continues to generate the
symbols file.

Test: CI
Bug: 409181125
Change-Id: Id8aa67706bc9b347f2bdf23ca25d6584e32aac2a
parent d19d3e3f
Loading
Loading
Loading
Loading
+0 −22
Original line number Original line Diff line number Diff line
@@ -45,34 +45,12 @@ else
inject_module := $(linked_module)
inject_module := $(linked_module)
endif
endif


###########################################################
## Store a copy with symbols for symbolic debugging
###########################################################
ifeq ($(LOCAL_UNSTRIPPED_PATH),)
my_unstripped_path := $(TARGET_OUT_UNSTRIPPED)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
else
my_unstripped_path := $(LOCAL_UNSTRIPPED_PATH)
endif
symbolic_input := $(inject_module)
symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem)
elf_mapping_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(symbolic_output).textproto)

ALL_MODULES.$(my_register_name).SYMBOLIC_OUTPUT_PATH := $(symbolic_output)
ALL_MODULES.$(my_register_name).ELF_SYMBOL_MAPPING_PATH := $(elf_mapping_path)

$(eval $(call copy-unstripped-elf-file-with-mapping,$(symbolic_input),$(symbolic_output),$(elf_mapping_path)))

###########################################################
###########################################################
## Strip
## Strip
###########################################################
###########################################################
strip_input := $(inject_module)
strip_input := $(inject_module)
strip_output := $(LOCAL_BUILT_MODULE)
strip_output := $(LOCAL_BUILT_MODULE)


# Use an order-only dependency to ensure the unstripped file in the symbols
# directory is copied when the module is built, but does not force the
# module to be rebuilt when the symbols directory is cleaned by installclean.
$(strip_output): | $(symbolic_output)

my_strip_module := $(firstword \
my_strip_module := $(firstword \
  $(LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
  $(LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
  $(LOCAL_STRIP_MODULE))
  $(LOCAL_STRIP_MODULE))