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

@@ -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 :=