Fix BOARD_SYSTEMSDK_VERSIONS checks

BOARD_SYSTEMSDK_VERSIONS must be greater than or equal to the minimum
of PRODUCT_SHIPPING_API_LEVEL and BOARD_API_LEVEL. If BOARD_API_LEVEL
is not defined, read BOARD_SHIPPING_API_LEVEL. If both board api
levels are not defined, compare only with PRODUCT_SHIPPING_API_LEVEL.

Bug: 204964200
Bug: 201489975
Bug: 202919753
Test: manual test with different settings
Change-Id: I36fa0b2fed3bca9ebe1baad46ee1dbe8cb1414e3
This commit is contained in:
Justin Yun
2021-11-09 23:09:52 +09:00
parent a421192568
commit e81ec6960a
2 changed files with 21 additions and 6 deletions

View File

@@ -121,14 +121,26 @@ $(strip $(call _math_check_valid,$(1)) $(call _math_check_valid,$(2)) \
$(lastword $(filter $(1) $(2),$(__MATH_NUMBERS))))
endef
# Returns the lesser of $1 or $2.
define math_min
$(strip $(call _math_check_valid,$(1)) $(call _math_check_valid,$(2)) \
$(firstword $(filter $(1) $(2),$(__MATH_NUMBERS))))
endef
$(call math-expect-error,(call math_max),Argument missing)
$(call math-expect-error,(call math_max,1),Argument missing)
$(call math-expect-error,(call math_max,1 2,3),Multiple words in a single argument: 1 2)
$(call math-expect-error,(call math_min,1,2 3),Multiple words in a single argument: 2 3)
$(call math-expect,(call math_max,0,1),1)
$(call math-expect,(call math_max,1,0),1)
$(call math-expect,(call math_max,1,1),1)
$(call math-expect,(call math_max,5,42),42)
$(call math-expect,(call math_max,42,5),42)
$(call math-expect,(call math_min,0,1),0)
$(call math-expect,(call math_min,1,0),0)
$(call math-expect,(call math_min,1,1),1)
$(call math-expect,(call math_min,7,32),7)
$(call math-expect,(call math_min,32,7),7)
define math_gt_or_eq
$(if $(filter $(1),$(call math_max,$(1),$(2))),true)