########################################################### ## Standard rules for building any target-side binaries ## with dynamic linkage (dynamic libraries or executables ## that link with dynamic libraries) ## ## Files including this file must define a rule to build ## the target $(linked_module). ###########################################################
# This constraint means that we can hard-code any $(TARGET_*) variables.
ifdef LOCAL_IS_HOST_MODULE
$(error This file should not be used to build host binaries. Included by (or near) $(lastword $(filter-out config/%,$(MAKEFILE_LIST)))) endif
# The name of the target file, without any path prepended. # This duplicates logic from base_rules.mk because we need to # know its results before base_rules.mk is included. include $(BUILD_SYSTEM)/configure_module_stem.mk
# Define the target that is the unmodified output of the linker. # The basename of this target must be the same as the final output # binary name, because it's used to set the "soname" in the binary. # The includer of this file will define a rule to build this target.
linked_module := $(intermediates)/LINKED/$(notdir $(my_installed_module_stem))
# This tells binary.make to explicitly define the PRIVATE_ variables for # linked_module as well as for LOCAL_BUILT_MODULE.
LOCAL_INTERMEDIATE_TARGETS := $(linked_module)
################################### include $(BUILD_SYSTEM)/binary.mk ###################################
# 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)
ifeq ($($(my_prefix)OS),darwin) # llvm-strip does not support Darwin Mach-O yet.
my_strip_args += --use-gnu-strip endif
valid_strip := mini-debug-info keep_symbols true no_debuglink ifneq (,$(filter-out $(valid_strip),$(my_strip_module)))
$(call pretty-error,Invalid strip value $(my_strip_module), only one of $(valid_strip) allowed) endif
ifneq (,$(my_strip_module))
$(strip_output): PRIVATE_STRIP_ARGS := $(my_strip_args)
$(strip_output): PRIVATE_TOOLS_PREFIX := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)TOOLS_PREFIX)
$(strip_output): $(strip_input) $(SOONG_STRIP_PATH) $(XZ)
@echo"$($(PRIVATE_PREFIX)DISPLAY) Strip: $(PRIVATE_MODULE) ($@)"
CLANG_BIN=$(LLVM_PREBUILTS_PATH) \
CROSS_COMPILE=$(PRIVATE_TOOLS_PREFIX) \
XZ=$(XZ) \
CREATE_MINIDEBUGINFO=${CREATE_MINIDEBUGINFO} \
$(SOONG_STRIP_PATH) -i $< -o $@ -d $@.strip.d $(PRIVATE_STRIP_ARGS) ifneq ($(HOST_OS),darwin)
$(strip_output): $(CREATE_MINIDEBUGINFO) endif
$(callinclude-depfile,$(strip_output).strip.d,$(strip_output)) else # Don't strip the binary, just copy it. We can't skip this step # because a copy of the binary must appear at LOCAL_BUILT_MODULE.
$(strip_output): $(strip_input)
@echo"target Unstripped: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target) endif# my_strip_module
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.