Commit Graph

8 Commits

Author SHA1 Message Date
Steven Moreland
8907ad66d1 Reland "Consider non-shipping lunch targets to be future."
This reverts commit b5b8777686.

Reason for revert: reverted in b/348090986

Change-Id: I2cc85dc4bdf9ed3dc2fb4ff77d9dffa3c32dda76
2024-06-26 17:18:41 +00:00
Pechetty Sravani
b5b8777686 Revert "Consider non-shipping lunch targets to be future."
This reverts commit 27f601f5d9.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/348090986. Will be verifying through ABTD before submission.

Change-Id: I55e0880741e543309a7b991d49e59e4fa1f62e53
2024-06-19 07:47:32 +00:00
Steven Moreland
27f601f5d9 Consider non-shipping lunch targets to be future.
Many places in the codebase have checks like this:

    if shipping level > X: do cool thing Y

This is great because it reduces the cost to upgrade and test
old Android devices or refactor their code. However, many
targets, such as the NDK, the SDK, mainline modules, and so on
do not set a shipping level, so they don't get to do the cool
thing Y.

In order to resolve this, we could modify every check to check
the default case. However, this is an invasive change, and it
is not maintainable. Instead, consider non-shipping products to
always be in the future.

In general, Android features are required to be backwards
compatible, so this should always work for things like mainline.

Also note, this means when someone adds a new feature Y like this,
they'll clearly see the impact of it being added everywhere, rather
than on such a small selection of newly shipping devices. This
avoids a risk where a change needs to be run on mainline modules (or
other targets) but is not tested in this configuration from the
start.

Future work: many `ifndef` checks can be cleaned up after this,
or if this approach makes sense, they can be cleaned up in this
CL.

Bug: 339026799
Bug: 279808973
Bug: 333908433
Test: builds of:
- errorprone-trunk_staging
- mainline_modules_sdks-trunk_staging-userdebug
- mainline_modules_x86_64-trunk_staging-userdebug
- ndk
- sdk-trunk_staging-userdebug

Test: too large number gives:
  build/make/core/product_config.mk:598: error: integer greater than 10001 is not supported!.

Change-Id: I17c34267f774ea8b9265e1d798a67af7838715c5
2024-05-24 21:59:35 +00:00
Justin Yun
b2b556472c math.mk supports larger number comparison
To support 6-digit version format, extend the integer limit for
the comparison functions. It keeps the simple fast comparisons for
integers <= 100, but uses the extended functions for larger numbers.

Bug: 295269182
Test: make -f math.mk RUN_MATH_TESTS=true
Change-Id: Ib0752fbeb0a80796aeca663b0dc6bda0fd339440
2023-10-30 10:58:25 +09:00
Justin Yun
e81ec6960a 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
2021-11-10 00:34:17 +00:00
yawanng
522710f378 Add a rule to get numbers greater or equal to a minimum number.
Cherry-pick from b235859ac0

Bug: 171217392
Test: Make
Change-Id: I04df72f813f892f0b6dec8b48e2a113af4545148
Merged-In: I04df72f813f892f0b6dec8b48e2a113af4545148
2020-10-29 22:29:27 +00:00
Justin Yun
66c7af81f3 Define PRODUCT_PRODUCT_VNDK_VERSION automatically
PRODUCT_PRODUCT_VNDK_VERSION will be automatically set to true for
the devices with PRODUCT_SHIPPING_API_LEVEL newer than 29.

Bug: 146621746
Test: build with PRODUCT_SHIPPING_API_LEVEL set to 30
Change-Id: I78cd81d1d61e9089b163169bc495df8a880463da
2020-01-11 12:44:08 +00:00
Dan Willemsen
7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00