summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2025-03-18Add soong_config_set_int Cole Faust
For integer-typed values in select() Bug: 355539748 Test: soong tests Change-Id: I7ad08c97462efdf33425ba7d67423b39c3d01f95
2024-06-26Reland "Consider non-shipping lunch targets to be future." Steven Moreland
This reverts commit b5b87776867319314dbbb1f1512a5f5c9c18ffc1. Reason for revert: reverted in b/348090986 Change-Id: I2cc85dc4bdf9ed3dc2fb4ff77d9dffa3c32dda76
2024-06-19Revert "Consider non-shipping lunch targets to be future." Pechetty Sravani
This reverts commit 27f601f5d96bb6b94233169ae8a29ea4290e6904. Reason for revert: Droidmonitor triggered revert due to build breakage in b/348090986. Will be verifying through ABTD before submission. Change-Id: I55e0880741e543309a7b991d49e59e4fa1f62e53
2024-05-24Consider non-shipping lunch targets to be future. Steven Moreland
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
2023-10-30math.mk supports larger number comparison Justin Yun
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
2021-11-10Fix BOARD_SYSTEMSDK_VERSIONS checks Justin Yun
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-03Add macros for non-module license metadata and deps Bob Badour
Gets rid of .meta_module files and instead defers emitting rules until after all the non-module targets have been processed. Allows direct dependency on .meta_lic files, which in turn depend on license text files. Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Test: m systemlicense Test: m reportmissinglicenses Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
2021-02-11Preserve <uses-library> order in dexpreopt.config files. Ulya Trafimovich
Library order is important because it is used to construct class loader context, which is then written into OAT/ODEX files and chacked against class loader context constructed by PackageManager on the device. If the orders are different, dexpreopted code is rejected. This CL fixes a few problems that caused reordering: - 'filter' function arguments are swapped so that patterns list comes first, and the library list second - JSON representation of class loader context is changed to avoid unmarshaling it to Go maps, which may reorder keys - library list is no longer sorted (it's unclear why it was sorted) Bug: 132357300 Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \ adb wait-for-device && adb root && adb logcat \ | grep -E 'ClassLoaderContext [a-z ]+ mismatch' # empty grep output, no errors Change-Id: Ie76996d497e60da0948f1879d6db589ff3e968a2
2020-10-29Add a rule to get numbers greater or equal to a minimum number. yawanng
Cherry-pick from b235859ac07620df58988b4fade9f4edd59ea4eb Bug: 171217392 Test: Make Change-Id: I04df72f813f892f0b6dec8b48e2a113af4545148 Merged-In: I04df72f813f892f0b6dec8b48e2a113af4545148
2020-07-30Change use of sanity-check to "test". Makes comment line more clear what ↵ Daniel Cardenas
the code does. Update language to comply with Android's inclusive language guidance See https://source.android.com/setup/contribute/respectful-code for reference BUG=162536543 Change-Id: Ie9694d987e57670874e4708c55ad40da518d672b
2020-04-02strings.mk: Allow empty RHS values for inputs of collapse-pairs Youkichi Hosoi
This CL is to make the function collapse-pairs(), which is applied to lists of "property=value" pairs, allow empty properties (i.e. lines of the form "empty.prop="). Currently, the function only allows empty properties at the end (see https://android-review.googlesource.com/c/platform/build/+/722908). So empty properties in the middle result in broken property files (e.g. "a=b c= d=e" is transformed to "a=b c=d=e", in which the property "c", which originally has no value, is interpreted as having the value "d=e", whereas the property "d", which originally has the value "e", is missing from the resulting property file). This CL revises the function so as to keep empty properties in the middle as is (e.g. it returns "a=b c= d=e" for the above example), while preserving the behavior for well-formed lists like "a=b c= d e = f". Bug: 152379493 Test: make Change-Id: I35faeaedc3bc42e56e01201baf7ea6805a610439
2020-01-11Define PRODUCT_PRODUCT_VNDK_VERSION automatically Justin Yun
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
2019-08-08Move TOP/TOPDIR to build/make/common/core.mk Dan Willemsen
So that they're set properly during dumpvars / product loading. SHELL is already set in common/core.mk, so it's not necessary to be in core/main.mk as well (which quickly loads core/config.mk, which loads common/core.mk). Test: get_build_var TOP Test: get_build_var TOPDIR Change-Id: I8179ac32628b74ccf29851dc53bf83cfb4b280fd
2018-12-17Move dexpreopting to Soong Colin Cross
Move the dexpreopting logic into Soong. Make modules will be dexpreopted by executing the Soong logic in the standalone dexpreopt_gen binary, which will generate scripts that will perform dexpreopting for each module. Export global configuration as JSON to $OUT/dexpreopt.config, which will be used by dexpreopt_gen and Soong, and per-module JSON configuration that will be used by dexpreopt_gen. This relands I59b20c931ee3e5a8d35eb30da4148691c5095502, I39d580999947ee54cfefe875b57a028be5333bd7, Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and Ica006a007d112c232311435aaac0c0e476232b67, with a minor update to match the changes made to dexpreopt_gen arguments and a fix to correctly keep dexpreopt disabled on mac builds. Bug: 119412419 Bug: 120273280 Test: no differences to dexpreopt outputs on aosp_sailfish system/, only expected changes to dexpreopt outputs on system_other (.vdex files for privileged Soong modules no longer incorrectly contain .dex contents). Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
2018-12-14Revert "Move dexpreopting to Soong" Colin Cross
This reverts commit e736c58043290dad18ddbd690d554cdc413157a8. Test: none Bug: 119412419
2018-12-12Move dexpreopting to Soong Colin Cross
Move the dexpreopting logic into Soong. Make modules will be dexpreopted by executing the Soong logic in the standalone dexpreopt_gen binary, which will generate scripts that will perform dexpreopting for each module. Export global configuration as JSON to $OUT/dexpreopt.config, which will be used by dexpreopt_gen and Soong, and per-module JSON configuration that will be used by dexpreopt_gen. Bug: 119412419 Bug: 120273280 Test: no differences to dexpreopt outputs on aosp_sailfish system/, only expected changes to dexpreopt outputs on system_other (.vdex files for privileged Soong modules no longer incorrectly contain .dex contents). Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
2018-10-20Refactor common makefile fragments Dan Willemsen
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