# Native prebuilt coming from Soong. # Extra inputs: # LOCAL_SOONG_LINK_TYPE # LOCAL_SOONG_TOC # LOCAL_SOONG_UNSTRIPPED_BINARY # LOCAL_SOONG_VNDK_VERSION : means the version of VNDK where this module belongs
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
$(call pretty-error,soong_cc_rust_prebuilt.mk may only be used from Soong) endif
my_check_same_vndk_variants :=
same_vndk_variants_stamp := ifeq ($(LOCAL_CHECK_SAME_VNDK_VARIANTS),true) ifeq ($(filter hwaddress address, $(SANITIZE_TARGET)),) ifneq ($(CLANG_COVERAGE),true) # Do not compare VNDK variant for special cases e.g. coverage builds. ifneq ($(SKIP_VNDK_VARIANTS_CHECK),true)
my_check_same_vndk_variants := true
same_vndk_variants_stamp := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))/same_vndk_variants.timestamp endif endif endif endif
ifeq ($(my_check_same_vndk_variants),true) # Add the timestamp to the CHECKED list so that `checkbuild` can run it. # Note that because `checkbuild` doesn't check LOCAL_BUILT_MODULE for soong-built modules adding # the timestamp to LOCAL_BUILT_MODULE isn't enough. It is skipped when the vendor variant # isn't used at all and it may break in the downstream trees.
LOCAL_ADDITIONAL_CHECKED_MODULE += $(same_vndk_variants_stamp) endif
####################################### include $(BUILD_SYSTEM)/base_rules.mk #######################################
ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES RLIB_LIBRARIES DYLIB_LIBRARIES HEADER_LIBRARIES,$(LOCAL_MODULE_CLASS)),) # Soong module is a static or shared library
EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(LOCAL_EXPORT_CFLAGS)
EXPORTS.$(intermediates).DEPS := $(LOCAL_EXPORT_C_INCLUDE_DEPS)
# Use copy-or-link-prebuilt-to-target for host executables and shared libraries, # to preserve symlinks to the source trees. They can then run directly from the # prebuilt directories where the linker can load their dependencies using # relative RUNPATHs.
$(LOCAL_BUILT_MODULE): $(LOCAL_PREBUILT_MODULE_FILE) ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true)
$(copy-or-link-prebuilt-to-target) ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
[ -x $@ ] || ( $(callecho-error,$@,Target of symlink is not executable); false ) endif else
$(transform-prebuilt-to-target) ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
$(hide) chmod +x $@ endif endif
ifndef LOCAL_IS_HOST_MODULE
ifdef LOCAL_SOONG_UNSTRIPPED_BINARY ifneq ($(LOCAL_UNINSTALLABLE_MODULE),true)
my_symbol_path := $(if $(LOCAL_SOONG_SYMBOL_PATH),$(LOCAL_SOONG_SYMBOL_PATH),$(my_module_path)) # Store a copy with symbols for symbolic debugging
my_unstripped_path := $(TARGET_OUT_UNSTRIPPED)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_symbol_path)) # drop /root as /root is mounted as /
my_unstripped_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/root/%,$(TARGET_OUT_UNSTRIPPED)/%, $(my_unstripped_path))
symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem)
elf_symbol_mapping_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/%,$(call intermediates-dir-for,PACKAGING,elf_symbol_mapping)/%,$(symbolic_output).textproto)
ifeq ($(NATIVE_COVERAGE),true) ifneq (,$(strip $(LOCAL_PREBUILT_COVERAGE_ARCHIVE)))
$(eval $(callcopy-one-file,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(intermediates)/$(LOCAL_MODULE).zip)) else # Coverage information is needed when static lib is a dependency of another # coverage-enabled module. ifeq (STATIC_LIBRARIES, $(LOCAL_MODULE_CLASS))
GCNO_ARCHIVE := $(LOCAL_MODULE).zip
$(intermediates)/$(GCNO_ARCHIVE) : $(SOONG_ZIP) $(MERGE_ZIPS)
$(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_OBJECTS :=
$(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_WHOLE_STATIC_LIBRARIES :=
$(intermediates)/$(GCNO_ARCHIVE) :
$(package-coverage-files) endif endif endif
# A product may be configured to strip everything in some build variants. # We do the stripping as a post-install command so that LOCAL_BUILT_MODULE # is still with the symbols and we don't need to clean it (and relink) when # you switch build variant. ifneq ($(filter $(STRIP_EVERYTHING_BUILD_VARIANTS),$(TARGET_BUILD_VARIANT)),)
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := \
$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_STRIP) --strip-all $(LOCAL_INSTALLED_MODULE) endif
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.