Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK

https://android-review.git.corp.google.com/q/topic:limit_systemsdk
introduced a new check for preventing the use of system SDKs above 34
from Java modules in the vendor partition.

As this may break some unprepared targets, introduce
BUILD_BROKEN_DONT_CHECK_SYSTEMSDK as a temporary escape hatch.

This flag will be deleted eventually.

Bug: 314011075
Test: Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK := true to BoardConfig.mk
Change-Id: Ie70ce428ec3df8580099efd99e5c7c9c4f9daecb
This commit is contained in:
Jiyong Park
2024-01-04 22:01:30 +09:00
parent 0284ba297c
commit 7a0e042276
3 changed files with 6 additions and 2 deletions

View File

@@ -186,6 +186,7 @@ _build_broken_var_list := \
BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES \
BUILD_BROKEN_INCORRECT_PARTITION_IMAGES \
BUILD_BROKEN_GENRULE_SANDBOXING \
BUILD_BROKEN_DONT_CHECK_SYSTEMSDK \
_build_broken_var_list += \
$(foreach m,$(AVAILABLE_BUILD_MODULE_TYPES) \

View File

@@ -82,8 +82,10 @@ ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION)))
endif
ifneq ($(_system_sdk_version),$(filter $(_system_sdk_version),$(_supported_systemsdk_versions)))
$(call pretty-error,Incompatible LOCAL_SDK_VERSION '$(LOCAL_SDK_VERSION)'. \
System SDK version '$(_system_sdk_version)' is not supported. Supported versions are: $(_supported_systemsdk_versions))
ifneq (true,$(BUILD_BROKEN_DONT_CHECK_SYSTEMSDK)
$(call pretty-error,Incompatible LOCAL_SDK_VERSION '$(LOCAL_SDK_VERSION)'. \
System SDK version '$(_system_sdk_version)' is not supported. Supported versions are: $(_supported_systemsdk_versions))
endif
endif
_system_sdk_version :=
_supported_systemsdk_versions :=

View File

@@ -299,6 +299,7 @@ $(call add_json_bool, BuildBrokenUsesSoongPython2Modules, $(filter true,$(BUILD
$(call add_json_bool, BuildBrokenVendorPropertyNamespace, $(filter true,$(BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE)))
$(call add_json_bool, BuildBrokenIncorrectPartitionImages, $(filter true,$(BUILD_BROKEN_INCORRECT_PARTITION_IMAGES)))
$(call add_json_list, BuildBrokenInputDirModules, $(BUILD_BROKEN_INPUT_DIR_MODULES))
$(call add_json_bool, BuildBrokenDontCheckSystemSdk, $(filter true,$(BUILD_BROKEN_DONT_CHECK_SYSTEMSDK)))
$(call add_json_list, BuildWarningBadOptionalUsesLibsAllowlist, $(BUILD_WARNING_BAD_OPTIONAL_USES_LIBS_ALLOWLIST))