Merge "Update test: true to mode: "test"" into main
diff --git a/core/board_config.mk b/core/board_config.mk
index b7ca3a4..ba887ce 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -202,7 +202,7 @@
# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)
- WITH_DEXPREOPT := true
+ WITH_DEXPREOPT ?= true
endif
# ###############################################################
diff --git a/core/config.mk b/core/config.mk
index c747fd5..a26ad67 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -427,10 +427,10 @@
endif
.KATI_READONLY := TARGET_MAX_PAGE_SIZE_SUPPORTED
-# Only arm64 arch supports TARGET_MAX_PAGE_SIZE_SUPPORTED greater than 4096.
+# Only arm64 and x86_64 archs supports TARGET_MAX_PAGE_SIZE_SUPPORTED greater than 4096.
ifneq ($(TARGET_MAX_PAGE_SIZE_SUPPORTED),4096)
- ifneq ($(TARGET_ARCH),arm64)
- $(error TARGET_MAX_PAGE_SIZE_SUPPORTED=$(TARGET_MAX_PAGE_SIZE_SUPPORTED) is greater than 4096. Only supported in arm64 arch)
+ ifeq (,$(filter arm64 x86_64,$(TARGET_ARCH)))
+ $(error TARGET_MAX_PAGE_SIZE_SUPPORTED=$(TARGET_MAX_PAGE_SIZE_SUPPORTED) is greater than 4096. Only supported in arm64 and x86_64 archs)
endif
endif
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index 6739459..badf189 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -58,25 +58,10 @@
# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)
- ifeq (eng,$(TARGET_BUILD_VARIANT))
- # For an eng build only pre-opt the boot image and system server. This gives reasonable performance
- # and still allows a simple workflow: building in frameworks/base and syncing.
- WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true
- endif
# Add mini-debug-info to the boot classpath unless explicitly asked not to.
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
PRODUCT_DEX_PREOPT_BOOT_FLAGS += --generate-mini-debug-info
endif
-
- # Non eng linux builds must have preopt enabled so that system server doesn't run as interpreter
- # only. b/74209329
- ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
- ifneq (true,$(WITH_DEXPREOPT))
- ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
- $(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds)
- endif
- endif
- endif
endif
# Get value of a property. It is first searched from PRODUCT_VENDOR_PROPERTIES
@@ -100,7 +85,7 @@
$(call add_json_bool, DisablePreopt, $(call invert_bool,$(ENABLE_PREOPT)))
$(call add_json_bool, DisablePreoptBootImages, $(call invert_bool,$(ENABLE_PREOPT_BOOT_IMAGES)))
$(call add_json_list, DisablePreoptModules, $(DEXPREOPT_DISABLED_MODULES))
- $(call add_json_bool, OnlyPreoptBootImageAndSystemServer, $(filter true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)))
+ $(call add_json_bool, OnlyPreoptArtBootImage , $(filter true,$(WITH_DEXPREOPT_ART_BOOT_IMG_ONLY)))
$(call add_json_bool, PreoptWithUpdatableBcp, $(filter true,$(DEX_PREOPT_WITH_UPDATABLE_BCP)))
$(call add_json_bool, DontUncompressPrivAppsDex, $(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 54a57d1..0155c67 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -60,17 +60,9 @@
LOCAL_DEX_PREOPT :=
endif
-# if WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true and module is not in boot class path skip
-# Also preopt system server jars since selinux prevents system server from loading anything from
-# /data. If we don't do this they will need to be extracted which is not favorable for RAM usage
-# or performance. If my_preopt_for_extracted_apk is true, we ignore the only preopt boot image
-# options.
-system_server_jars := $(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),$(call word-colon,2,$(m)))
ifneq (true,$(my_preopt_for_extracted_apk))
- ifeq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
- ifeq ($(filter $(system_server_jars) $(DEXPREOPT_BOOT_JARS_MODULES),$(LOCAL_MODULE)),)
- LOCAL_DEX_PREOPT :=
- endif
+ ifeq (true,$(WITH_DEXPREOPT_ART_BOOT_IMG_ONLY))
+ LOCAL_DEX_PREOPT :=
endif
endif
@@ -226,7 +218,7 @@
# as a failure to get manifest from an APK).
ifneq (true,$(WITH_DEXPREOPT))
LOCAL_ENFORCE_USES_LIBRARIES := false
-else ifeq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
+else ifeq (true,$(WITH_DEXPREOPT_ART_BOOT_IMG_ONLY))
LOCAL_ENFORCE_USES_LIBRARIES := false
endif
diff --git a/core/main.mk b/core/main.mk
index 3f5f766..c30f1d0 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -2162,7 +2162,7 @@
metadata_files := $(subst $(newline),$(space),$(file <$(metadata_list)))
$(PRODUCT_OUT)/sbom-metadata.csv:
rm -f $@
- echo installed_file,module_path,soong_module_type,is_prebuilt_make_module,product_copy_files,kernel_module_copy_files,is_platform_generated,build_output_path,static_libraries,whole_static_libraries,is_static_lib >> $@
+ echo 'installed_file,module_path,soong_module_type,is_prebuilt_make_module,product_copy_files,kernel_module_copy_files,is_platform_generated,build_output_path,static_libraries,whole_static_libraries,is_static_lib' >> $@
$(eval _all_static_libs :=)
$(foreach f,$(installed_files),\
$(eval _module_name := $(ALL_INSTALLED_FILES.$f)) \
@@ -2190,7 +2190,7 @@
$(eval _whole_static_libs := $(ALL_INSTALLED_FILES.$f.WHOLE_STATIC_LIBRARIES)) \
$(foreach l,$(_static_libs),$(eval _all_static_libs += $l:$(strip $(sort $(ALL_MODULES.$l.PATH))):$(strip $(sort $(ALL_MODULES.$l.SOONG_MODULE_TYPE))):$(ALL_STATIC_LIBRARIES.$l.BUILT_FILE))) \
$(foreach l,$(_whole_static_libs),$(eval _all_static_libs += $l:$(strip $(sort $(ALL_MODULES.$l.PATH))):$(strip $(sort $(ALL_MODULES.$l.SOONG_MODULE_TYPE))):$(ALL_STATIC_LIBRARIES.$l.BUILT_FILE))) \
- echo /$(_path_on_device),$(_module_path),$(_soong_module_type),$(_is_prebuilt_make_module),$(_product_copy_files),$(_kernel_module_copy_files),$(_is_platform_generated),$(_build_output_path),$(_static_libs),$(_whole_static_libs), >> $@; \
+ echo '/$(_path_on_device),$(_module_path),$(_soong_module_type),$(_is_prebuilt_make_module),$(_product_copy_files),$(_kernel_module_copy_files),$(_is_platform_generated),$(_build_output_path),$(_static_libs),$(_whole_static_libs),' >> $@; \
)
$(foreach l,$(sort $(_all_static_libs)), \
$(eval _lib_stem := $(call word-colon,1,$l)) \
@@ -2200,7 +2200,7 @@
$(eval _static_libs := $(ALL_STATIC_LIBRARIES.$l.STATIC_LIBRARIES)) \
$(eval _whole_static_libs := $(ALL_STATIC_LIBRARIES.$l.WHOLE_STATIC_LIBRARIES)) \
$(eval _is_static_lib := Y) \
- echo $(_lib_stem).a,$(_module_path),$(_soong_module_type),,,,,$(_built_file),$(_static_libs),$(_whole_static_libs),$(_is_static_lib) >> $@; \
+ echo '$(_lib_stem).a,$(_module_path),$(_soong_module_type),,,,,$(_built_file),$(_static_libs),$(_whole_static_libs),$(_is_static_lib)' >> $@; \
)
# (TODO: b/272358583 find another way of always rebuilding sbom.spdx)
diff --git a/core/notice_files.mk b/core/notice_files.mk
index a5852cc..7465cbf 100644
--- a/core/notice_files.mk
+++ b/core/notice_files.mk
@@ -1,36 +1,11 @@
###########################################################
## Track NOTICE files
###########################################################
-$(call record-module-type,NOTICE_FILE)
ifneq ($(LOCAL_NOTICE_FILE),)
-notice_file:=$(strip $(LOCAL_NOTICE_FILE))
+ notice_file:=$(strip $(LOCAL_NOTICE_FILE))
else
-notice_file:=$(strip $(wildcard $(LOCAL_PATH)/LICENSE $(LOCAL_PATH)/LICENCE $(LOCAL_PATH)/NOTICE))
-endif
-
-ifneq (,$(strip $(LOCAL_LICENSE_PACKAGE_NAME)))
-license_package_name:=$(strip $(LOCAL_LICENSE_PACKAGE_NAME))
-else
-license_package_name:=
-endif
-
-ifneq (,$(strip $(LOCAL_LICENSE_INSTALL_MAP)))
-install_map:=$(strip $(LOCAL_LICENSE_INSTALL_MAP))
-else
-install_map:=
-endif
-
-ifneq (,$(strip $(LOCAL_LICENSE_KINDS)))
-license_kinds:=$(strip $(LOCAL_LICENSE_KINDS))
-else
-license_kinds:=legacy_by_exception_only
-endif
-
-ifneq (,$(strip $(LOCAL_LICENSE_CONDITIONS)))
-license_conditions:=$(strip $(LOCAL_LICENSE_CONDITIONS))
-else
-license_conditions:=by_exception_only
+ notice_file:=$(strip $(wildcard $(LOCAL_PATH)/LICENSE $(LOCAL_PATH)/LICENCE $(LOCAL_PATH)/NOTICE))
endif
ifeq ($(LOCAL_MODULE_CLASS),GYP)
@@ -51,117 +26,118 @@
notice_file :=
endif
-ifeq ($(LOCAL_MODULE_CLASS),NOTICE_FILES)
-# If this is a NOTICE-only module, we don't include base_rule.mk,
-# so my_prefix is not set at this point.
-ifeq ($(LOCAL_IS_HOST_MODULE),true)
- my_prefix := HOST_
- LOCAL_HOST_PREFIX :=
+module_license_metadata := $(call local-meta-intermediates-dir)/$(my_register_name).meta_lic
+
+$(foreach target,$(ALL_MODULES.$(my_register_name).BUILT) $(ALL_MODULES.$(my_register_name).INSTALLED) $(foreach bi,$(LOCAL_SOONG_BUILT_INSTALLED),$(call word-colon,1,$(bi))),\
+ $(eval ALL_TARGETS.$(target).META_LIC := $(module_license_metadata)))
+
+$(foreach f,$(my_test_data) $(my_test_config),\
+ $(if $(strip $(ALL_TARGETS.$(call word-colon,1,$(f)).META_LIC)), \
+ $(call declare-copy-target-license-metadata,$(call word-colon,2,$(f)),$(call word-colon,1,$(f))), \
+ $(eval ALL_TARGETS.$(call word-colon,2,$(f)).META_LIC := $(module_license_metadata))))
+
+ALL_MODULES.$(my_register_name).META_LIC := $(strip $(ALL_MODULES.$(my_register_name).META_LIC) $(module_license_metadata))
+
+ifdef LOCAL_SOONG_LICENSE_METADATA
+ # Soong modules have already produced a license metadata file, copy it to where Make expects it.
+ $(eval $(call copy-one-license-metadata-file, $(LOCAL_SOONG_LICENSE_METADATA), $(module_license_metadata),$(ALL_MODULES.$(my_register_name).BUILT),$(ALL_MODUES.$(my_register_name).INSTALLED)))
else
- my_prefix := TARGET_
-endif
-endif
+ # Make modules don't have enough information to produce a license metadata rule until after fix-notice-deps
+ # has been called, store the necessary information until later.
-installed_notice_file :=
-
-is_container:=$(strip $(LOCAL_MODULE_IS_CONTAINER))
-ifeq (,$(is_container))
-ifneq (,$(strip $(filter %.zip %.tar %.tgz %.tar.gz %.apk %.img %.srcszip %.apex, $(LOCAL_BUILT_MODULE))))
-is_container:=true
-else
-is_container:=false
-endif
-else ifneq (,$(strip $(filter-out true false,$(is_container))))
-$(error Unrecognized value '$(is_container)' for LOCAL_MODULE_IS_CONTAINER)
-endif
-
-ifeq (true,$(is_container))
-# Include shared libraries' notices for "container" types, but not for binaries etc.
-notice_deps := \
- $(strip \
- $(foreach d, \
- $(LOCAL_REQUIRED_MODULES) \
- $(LOCAL_STATIC_LIBRARIES) \
- $(LOCAL_WHOLE_STATIC_LIBRARIES) \
- $(LOCAL_SHARED_LIBRARIES) \
- $(LOCAL_DYLIB_LIBRARIES) \
- $(LOCAL_RLIB_LIBRARIES) \
- $(LOCAL_PROC_MACRO_LIBRARIES) \
- $(LOCAL_HEADER_LIBRARIES) \
- $(LOCAL_STATIC_JAVA_LIBRARIES) \
- $(LOCAL_JAVA_LIBRARIES) \
- $(LOCAL_JNI_SHARED_LIBRARIES) \
- ,$(subst :,_,$(d)):static \
- ) \
- )
-else
-notice_deps := \
- $(strip \
- $(foreach d, \
- $(LOCAL_REQUIRED_MODULES) \
- $(LOCAL_STATIC_LIBRARIES) \
- $(LOCAL_WHOLE_STATIC_LIBRARIES) \
- $(LOCAL_RLIB_LIBRARIES) \
- $(LOCAL_PROC_MACRO_LIBRARIES) \
- $(LOCAL_HEADER_LIBRARIES) \
- $(LOCAL_STATIC_JAVA_LIBRARIES) \
- ,$(subst :,_,$(d)):static \
- )$(foreach d, \
- $(LOCAL_SHARED_LIBRARIES) \
- $(LOCAL_DYLIB_LIBRARIES) \
- $(LOCAL_JAVA_LIBRARIES) \
- $(LOCAL_JNI_SHARED_LIBRARIES) \
- ,$(subst :,_,$(d)):dynamic \
- ) \
- )
-endif
-ifeq ($(LOCAL_IS_HOST_MODULE),true)
-notice_deps := $(strip $(notice_deps) $(foreach d,$(LOCAL_HOST_REQUIRED_MODULES),$(subst :,_,$(d)):static))
-else
-notice_deps := $(strip $(notice_deps) $(foreach d,$(LOCAL_TARGET_REQUIRED_MODULES),$(subst :,_,$(d)):static))
-endif
-
-local_path := $(LOCAL_PATH)
-
-
-module_license_metadata :=
-
-ifdef my_register_name
- module_license_metadata := $(call local-meta-intermediates-dir)/$(my_register_name).meta_lic
-
- $(foreach target,$(ALL_MODULES.$(my_register_name).BUILT) $(ALL_MODULES.$(my_register_name).INSTALLED) $(foreach bi,$(LOCAL_SOONG_BUILT_INSTALLED),$(call word-colon,1,$(bi))),\
- $(eval ALL_TARGETS.$(target).META_LIC := $(module_license_metadata)))
-
- $(foreach f,$(my_test_data) $(my_test_config),\
- $(if $(strip $(ALL_TARGETS.$(call word-colon,1,$(f)).META_LIC)), \
- $(call declare-copy-target-license-metadata,$(call word-colon,2,$(f)),$(call word-colon,1,$(f))), \
- $(eval ALL_TARGETS.$(call word-colon,2,$(f)).META_LIC := $(module_license_metadata))))
-
- ALL_MODULES.$(my_register_name).META_LIC := $(strip $(ALL_MODULES.$(my_register_name).META_LIC) $(module_license_metadata))
-
- ifdef LOCAL_SOONG_LICENSE_METADATA
- # Soong modules have already produced a license metadata file, copy it to where Make expects it.
- $(eval $(call copy-one-license-metadata-file, $(LOCAL_SOONG_LICENSE_METADATA), $(module_license_metadata),$(ALL_MODULES.$(my_register_name).BUILT),$(ALL_MODUES.$(my_register_name).INSTALLED)))
+ ifneq (,$(strip $(LOCAL_LICENSE_PACKAGE_NAME)))
+ license_package_name:=$(strip $(LOCAL_LICENSE_PACKAGE_NAME))
else
- # Make modules don't have enough information to produce a license metadata rule until after fix-notice-deps
- # has been called, store the necessary information until later.
- ALL_MODULES.$(my_register_name).DELAYED_META_LIC := $(strip $(ALL_MODULES.$(my_register_name).DELAYED_META_LIC) $(module_license_metadata))
- ALL_MODULES.$(my_register_name).LICENSE_PACKAGE_NAME := $(strip $(license_package_name))
- ALL_MODULES.$(my_register_name).MODULE_TYPE := $(strip $(ALL_MODULES.$(my_register_name).MODULE_TYPE) $(LOCAL_MODULE_TYPE))
- ALL_MODULES.$(my_register_name).MODULE_CLASS := $(strip $(ALL_MODULES.$(my_register_name).MODULE_CLASS) $(LOCAL_MODULE_CLASS))
- ALL_MODULES.$(my_register_name).LICENSE_KINDS := $(ALL_MODULES.$(my_register_name).LICENSE_KINDS) $(license_kinds)
- ALL_MODULES.$(my_register_name).LICENSE_CONDITIONS := $(ALL_MODULES.$(my_register_name).LICENSE_CONDITIONS) $(license_conditions)
- ALL_MODULES.$(my_register_name).LICENSE_INSTALL_MAP := $(ALL_MODULES.$(my_register_name).LICENSE_INSTALL_MAP) $(install_map)
- ALL_MODULES.$(my_register_name).NOTICE_DEPS := $(ALL_MODULES.$(my_register_name).NOTICE_DEPS) $(notice_deps)
- ALL_MODULES.$(my_register_name).IS_CONTAINER := $(strip $(filter-out false,$(ALL_MODULES.$(my_register_name).IS_CONTAINER) $(is_container)))
- ALL_MODULES.$(my_register_name).PATH := $(strip $(ALL_MODULES.$(my_register_name).PATH) $(local_path))
+ license_package_name:=
endif
+
+ ifneq (,$(strip $(LOCAL_LICENSE_INSTALL_MAP)))
+ install_map:=$(strip $(LOCAL_LICENSE_INSTALL_MAP))
+ else
+ install_map:=
+ endif
+
+ ifneq (,$(strip $(LOCAL_LICENSE_KINDS)))
+ license_kinds:=$(strip $(LOCAL_LICENSE_KINDS))
+ else
+ license_kinds:=legacy_by_exception_only
+ endif
+
+ ifneq (,$(strip $(LOCAL_LICENSE_CONDITIONS)))
+ license_conditions:=$(strip $(LOCAL_LICENSE_CONDITIONS))
+ else
+ license_conditions:=by_exception_only
+ endif
+
+ is_container:=$(strip $(LOCAL_MODULE_IS_CONTAINER))
+ ifeq (,$(is_container))
+ ifneq (,$(strip $(filter %.zip %.tar %.tgz %.tar.gz %.apk %.img %.srcszip %.apex, $(LOCAL_BUILT_MODULE))))
+ is_container:=true
+ else
+ is_container:=false
+ endif
+ else ifneq (,$(strip $(filter-out true false,$(is_container))))
+ $(error Unrecognized value '$(is_container)' for LOCAL_MODULE_IS_CONTAINER)
+ endif
+
+ ifeq (true,$(is_container))
+ # Include shared libraries' notices for "container" types, but not for binaries etc.
+ notice_deps := \
+ $(strip \
+ $(foreach d, \
+ $(LOCAL_REQUIRED_MODULES) \
+ $(LOCAL_STATIC_LIBRARIES) \
+ $(LOCAL_WHOLE_STATIC_LIBRARIES) \
+ $(LOCAL_SHARED_LIBRARIES) \
+ $(LOCAL_DYLIB_LIBRARIES) \
+ $(LOCAL_RLIB_LIBRARIES) \
+ $(LOCAL_PROC_MACRO_LIBRARIES) \
+ $(LOCAL_HEADER_LIBRARIES) \
+ $(LOCAL_STATIC_JAVA_LIBRARIES) \
+ $(LOCAL_JAVA_LIBRARIES) \
+ $(LOCAL_JNI_SHARED_LIBRARIES) \
+ ,$(subst :,_,$(d)):static \
+ ) \
+ )
+ else
+ notice_deps := \
+ $(strip \
+ $(foreach d, \
+ $(LOCAL_REQUIRED_MODULES) \
+ $(LOCAL_STATIC_LIBRARIES) \
+ $(LOCAL_WHOLE_STATIC_LIBRARIES) \
+ $(LOCAL_RLIB_LIBRARIES) \
+ $(LOCAL_PROC_MACRO_LIBRARIES) \
+ $(LOCAL_HEADER_LIBRARIES) \
+ $(LOCAL_STATIC_JAVA_LIBRARIES) \
+ ,$(subst :,_,$(d)):static \
+ )$(foreach d, \
+ $(LOCAL_SHARED_LIBRARIES) \
+ $(LOCAL_DYLIB_LIBRARIES) \
+ $(LOCAL_JAVA_LIBRARIES) \
+ $(LOCAL_JNI_SHARED_LIBRARIES) \
+ ,$(subst :,_,$(d)):dynamic \
+ ) \
+ )
+ endif
+ ifeq ($(LOCAL_IS_HOST_MODULE),true)
+ notice_deps := $(strip $(notice_deps) $(foreach d,$(LOCAL_HOST_REQUIRED_MODULES),$(subst :,_,$(d)):static))
+ else
+ notice_deps := $(strip $(notice_deps) $(foreach d,$(LOCAL_TARGET_REQUIRED_MODULES),$(subst :,_,$(d)):static))
+ endif
+
+ ALL_MODULES.$(my_register_name).DELAYED_META_LIC := $(strip $(ALL_MODULES.$(my_register_name).DELAYED_META_LIC) $(module_license_metadata))
+ ALL_MODULES.$(my_register_name).LICENSE_PACKAGE_NAME := $(strip $(license_package_name))
+ ALL_MODULES.$(my_register_name).MODULE_TYPE := $(strip $(ALL_MODULES.$(my_register_name).MODULE_TYPE) $(LOCAL_MODULE_TYPE))
+ ALL_MODULES.$(my_register_name).MODULE_CLASS := $(strip $(ALL_MODULES.$(my_register_name).MODULE_CLASS) $(LOCAL_MODULE_CLASS))
+ ALL_MODULES.$(my_register_name).LICENSE_KINDS := $(ALL_MODULES.$(my_register_name).LICENSE_KINDS) $(license_kinds)
+ ALL_MODULES.$(my_register_name).LICENSE_CONDITIONS := $(ALL_MODULES.$(my_register_name).LICENSE_CONDITIONS) $(license_conditions)
+ ALL_MODULES.$(my_register_name).LICENSE_INSTALL_MAP := $(ALL_MODULES.$(my_register_name).LICENSE_INSTALL_MAP) $(install_map)
+ ALL_MODULES.$(my_register_name).NOTICE_DEPS := $(ALL_MODULES.$(my_register_name).NOTICE_DEPS) $(notice_deps)
+ ALL_MODULES.$(my_register_name).IS_CONTAINER := $(strip $(filter-out false,$(ALL_MODULES.$(my_register_name).IS_CONTAINER) $(is_container)))
+ ALL_MODULES.$(my_register_name).PATH := $(strip $(ALL_MODULES.$(my_register_name).PATH) $(local_path))
endif
ifdef notice_file
-
-ifdef my_register_name
ALL_MODULES.$(my_register_name).NOTICES := $(ALL_MODULES.$(my_register_name).NOTICES) $(notice_file)
-endif
-
endif # notice_file
diff --git a/core/product.mk b/core/product.mk
index 07719e1..0d5a07d 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -548,7 +548,7 @@
# be cleaned up to not be product variables.
_readonly_late_variables := \
DEVICE_PACKAGE_OVERLAYS \
- WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY \
+ WITH_DEXPREOPT_ART_BOOT_IMG_ONLY \
# Modified internally in the build system
_readonly_late_variables += \
diff --git a/core/release_config.scl b/core/release_config.scl
index 101f119..662d155 100644
--- a/core/release_config.scl
+++ b/core/release_config.scl
@@ -80,23 +80,18 @@
},
}
-def flag(name, partitions, default, _kwmarker = (), appends = False):
+def flag(name, partitions, default, *, appends = False):
"""Declare a flag.
Args:
name: name of the flag
partitions: the partitions where this should be recorded.
default: the default value of the flag.
- _kwmarker: Used to detect argument misuse.
appends: Whether new values should be append (not replace) the old.
Returns:
A dictionary containing the flag declaration.
"""
-
- # If specified, appends must be a keyword value.
- if _kwmarker != ():
- fail("Too many positional parameters")
if not partitions:
fail("At least 1 partition is required")
if not name.startswith("RELEASE_"):
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index e3ebaa3..007d6c6 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -21,7 +21,6 @@
am \
android.hidl.base-V1.0-java \
android.hidl.manager-V1.0-java \
- android.hidl.memory@1.0-impl \
android.system.suspend-service \
android.test.base \
android.test.mock \
@@ -315,6 +314,13 @@
HIDL_SUPPORT_SERVICES := \
hwservicemanager \
android.hidl.allocator@1.0-service \
+ android.hidl.memory@1.0-impl \
+
+# TODO(b/299166571) Remove this after the artifact path requirements checker picks up
+# this library correctly with the *SHIPPING_API_LEVEL_34 variable
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
+ $(TARGET_COPY_OUT_SYSTEM)/lib/hw/android.hidl.memory@1.0-impl.so \
+ $(TARGET_COPY_OUT_SYSTEM)/lib64/hw/android.hidl.memory@1.0-impl.so \
# Base modules when shipping api level is less than or equal to 34
PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 += \
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index 8d5b7bf..a0c5929 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -46,7 +46,6 @@
# Base modules and settings for the vendor partition.
PRODUCT_PACKAGES += \
- android.hidl.memory@1.0-impl.vendor \
com.android.hardware.cas \
boringssl_self_test_vendor \
dumpsys_vendor \
@@ -75,6 +74,10 @@
selinux_policy_nonsystem \
shell_and_utilities_vendor \
+# Base modules when shipping api level is less than or equal to 34
+PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 += \
+ android.hidl.memory@1.0-impl.vendor \
+
# OMX not supported for 64bit_only builds
# Only supported when SHIPPING_API_LEVEL is less than or equal to 33
ifneq ($(TARGET_SUPPORTS_OMX_SERVICE),false)
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt
index 9ff886e..53c9e0c 100644
--- a/target/product/gsi/current.txt
+++ b/target/product/gsi/current.txt
@@ -34,7 +34,6 @@
VNDK-SP: android.hardware.graphics.mapper@4.0.so
VNDK-SP: android.hardware.renderscript@1.0.so
VNDK-SP: android.hidl.memory.token@1.0.so
-VNDK-SP: android.hidl.memory@1.0-impl.so
VNDK-SP: android.hidl.memory@1.0.so
VNDK-SP: android.hidl.safe_union@1.0.so
VNDK-SP: libRSCpuRef.so
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index 23eb534..fc5db6a 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -62,13 +62,16 @@
PRODUCT_COPY_FILES += \
device/generic/common/overlays/overlay-config.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/overlay/config/config.xml
+# b/308878144 no more VNDK on 24Q1 and beyond
+KEEP_VNDK ?= false
+
# Support additional VNDK snapshots
PRODUCT_EXTRA_VNDK_VERSIONS := \
- 29 \
30 \
31 \
32 \
33 \
+ 34 \
# Do not build non-GSI partition images.
PRODUCT_BUILD_CACHE_IMAGE := false
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index 68ed249..1e01b33 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -102,39 +102,63 @@
PRODUCT_SYSTEM_PROPERTIES += \
ro.dalvik.vm.native.bridge?=0
-# Different dexopt types for different package update/install times.
-# On eng builds, make "boot" reasons only extract for faster turnaround.
-ifeq (eng,$(TARGET_BUILD_VARIANT))
- PRODUCT_SYSTEM_PROPERTIES += \
- pm.dexopt.first-boot?=extract \
- pm.dexopt.boot-after-ota?=extract
-else
- PRODUCT_SYSTEM_PROPERTIES += \
- pm.dexopt.first-boot?=verify \
- pm.dexopt.boot-after-ota?=verify
-endif
-
# The install filter is speed-profile in order to enable the use of
# profiles from the dex metadata files. Note that if a profile is not provided
# or if it is empty speed-profile is equivalent to (quicken + empty app image).
# Note that `cmdline` is not strictly needed but it simplifies the management
# of compilation reason in the platform (as we have a unified, single path,
# without exceptions).
+# TODO(b/243646876): Remove `pm.dexopt.post-boot`.
PRODUCT_SYSTEM_PROPERTIES += \
- pm.dexopt.post-boot?=extract \
+ pm.dexopt.post-boot?=verify \
+ pm.dexopt.first-boot?=verify \
+ pm.dexopt.boot-after-ota?=verify \
pm.dexopt.boot-after-mainline-update?=verify \
pm.dexopt.install?=speed-profile \
pm.dexopt.install-fast?=skip \
pm.dexopt.install-bulk?=speed-profile \
pm.dexopt.install-bulk-secondary?=verify \
pm.dexopt.install-bulk-downgraded?=verify \
- pm.dexopt.install-bulk-secondary-downgraded?=extract \
+ pm.dexopt.install-bulk-secondary-downgraded?=verify \
pm.dexopt.bg-dexopt?=speed-profile \
pm.dexopt.ab-ota?=speed-profile \
pm.dexopt.inactive?=verify \
pm.dexopt.cmdline?=verify \
pm.dexopt.shared?=speed
+ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
+ OVERRIDE_DISABLE_DEXOPT_ALL ?= true
+endif
+
+# OVERRIDE_DISABLE_DEXOPT_ALL disables all dexpreopt (build-time) and dexopt (on-device) activities.
+# This option is for faster iteration during development and should never be enabled for production.
+ifneq (,$(filter true,$(OVERRIDE_DISABLE_DEXOPT_ALL)))
+ PRODUCT_SYSTEM_PROPERTIES += \
+ pm.dexopt.post-boot=skip \
+ pm.dexopt.first-boot=skip \
+ pm.dexopt.boot-after-ota=skip \
+ pm.dexopt.boot-after-mainline-update=skip \
+ pm.dexopt.install=skip \
+ pm.dexopt.install-fast=skip \
+ pm.dexopt.install-bulk=skip \
+ pm.dexopt.install-bulk-secondary=skip \
+ pm.dexopt.install-bulk-downgraded=skip \
+ pm.dexopt.install-bulk-secondary-downgraded=skip \
+ pm.dexopt.bg-dexopt=skip \
+ pm.dexopt.ab-ota=skip \
+ pm.dexopt.inactive=skip \
+ pm.dexopt.cmdline=skip \
+ pm.dexopt.shared=skip
+
+ PRODUCT_SYSTEM_PROPERTIES += dalvik.vm.disable-odrefresh=true
+
+ # Disable all dexpreopt activities except for the ART boot image.
+ # We have to dexpreopt the ART boot image because they are used by ART tests. This should not
+ # be too much of a problem for platform developers because a change to framework code should not
+ # trigger dexpreopt for the ART boot image.
+ WITH_DEXPREOPT_ART_BOOT_IMG_ONLY := true
+endif
+
# Enable resolution of startup const strings.
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.dex2oat-resolve-startup-strings=true
diff --git a/tools/rbcrun/host.go b/tools/rbcrun/host.go
index 7f5e332..f36553e 100644
--- a/tools/rbcrun/host.go
+++ b/tools/rbcrun/host.go
@@ -63,6 +63,14 @@
"json": starlarkjson.Module,
}
+func isSymlink(filepath string) (bool, error) {
+ if info, err := os.Lstat(filepath); err == nil {
+ return info.Mode() & os.ModeSymlink != 0, nil
+ } else {
+ return false, err
+ }
+}
+
// Takes a module name (the first argument to the load() function) and returns the path
// it's trying to load, stripping out leading //, and handling leading :s.
func cleanModuleName(moduleName string, callerDir string, allowExternalPaths bool) (string, error) {
@@ -158,6 +166,13 @@
if strings.HasSuffix(modulePath, ".scl") {
mode = ExecutionModeScl
}
+
+ if sym, err := isSymlink(modulePath); sym && err == nil {
+ return nil, fmt.Errorf("symlinks to starlark files are not allowed. Instead, load the target file and re-export its symbols: %s", modulePath)
+ } else if err != nil {
+ return nil, err
+ }
+
childThread := &starlark.Thread{Name: "exec " + module, Load: thread.Load}
// Cheating for the sake of testing:
// propagate starlarktest's Reporter key, otherwise testing
@@ -368,6 +383,12 @@
return nil, nil, err
}
+ if sym, err := isSymlink(filename); sym && err == nil {
+ return nil, nil, fmt.Errorf("symlinks to starlark files are not allowed. Instead, load the target file and re-export its symbols: %s", filename)
+ } else if err != nil {
+ return nil, nil, err
+ }
+
// Add top-level file to cache for cycle detection purposes
moduleCache[filename] = nil
diff --git a/tools/rbcrun/host_test.go b/tools/rbcrun/host_test.go
index 468a620..7cfeb14 100644
--- a/tools/rbcrun/host_test.go
+++ b/tools/rbcrun/host_test.go
@@ -186,6 +186,21 @@
}
}
+func TestCantLoadSymlink(t *testing.T) {
+ moduleCache = make(map[string]*modentry)
+ dir := dataDir()
+ if err := os.Chdir(filepath.Dir(dir)); err != nil {
+ t.Fatal(err)
+ }
+ _, _, err := Run("testdata/test_scl_symlink.scl", nil, ExecutionModeScl, false)
+ if err == nil {
+ t.Fatal("Expected failure")
+ }
+ if !strings.Contains(err.Error(), "symlinks to starlark files are not allowed") {
+ t.Fatalf("Expected error to contain \"symlinks to starlark files are not allowed\": %q", err.Error())
+ }
+}
+
func TestShell(t *testing.T) {
exerciseStarlarkTestFile(t, "testdata/shell.star")
}
diff --git a/tools/rbcrun/testdata/test_scl_symlink.scl b/tools/rbcrun/testdata/test_scl_symlink.scl
new file mode 120000
index 0000000..3f5aef4
--- /dev/null
+++ b/tools/rbcrun/testdata/test_scl_symlink.scl
@@ -0,0 +1 @@
+test_scl.scl
\ No newline at end of file