summaryrefslogtreecommitdiff
path: root/android/variable.go
AgeCommit message (Collapse)Author
2022-04-27Add buildinfo_prop module Inseob Kim
buildinfo_prop module is a replacement for build/make/tools/buildinfo.sh so other images like microdroid can refer to build.prop. For now, buildinfo_prop only supports a few build.prop properties, and it's only used in microdroid. Bug: 189164487 Test: build Change-Id: I120654ca23a68de414df8da2051c6677afbab441
2022-04-08Flag to globally override apexes' min_sdk_version Albert Martin
Override all mainline updateable apexes' min_sdk_version to same version to get single shared native libs on DCLA. Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes Bug: 212609891 Change-Id: Ide7d3f2bc772ac6240f1c917b87285d051d6f605 Merged-In: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
2022-03-24Allow appending artifact in dist with product name Trevor Radcliffe
Some modules need to have their artifacts copied to dist with the product name appended. This CL enables that functionality in a boolean Soong property called append_artifact_with_product. Fixes: 224561567 Test: Unit tests and build relevant target/modules Change-Id: I4b824d4001679cebf0a9059be2d090d33a310933
2022-03-04Memory mapped coverage (take 2) Pirama Arumuga Nainar
Add a build variable, CLANG_COVERAGE_CONTINUOUS_MODE, instead of selecting based on paths. Test: CLANG_COVERAGE_CONTINUOUS_MODE=true m and verify continuous mode works Change-Id: I731172fc1f00e1cabff8efcf8b99f9a48210b446
2022-02-23Restrict genrules to disallow directories as input Liz Kammer
While Bazel genrules will allow genrules to accept a directory as input, the results can be unexpected to a user as changes to the contents of the directory may not trigger a rebuild as expected. Restricting this in Soong ensures that converted targets will behave as expected. Test: CI Change-Id: I8616f58d1df267005e6c0ca3f4730d06de52c0d9
2022-02-22Merge changes from topics "extdir", "threadvars" Anton Hansson
* changes: Add support for sdk extensions in prebuilt_apis Refactor prebuilt_apis.go Add base sdk extension version to the config
2022-02-17Add base sdk extension version to the config Anton Hansson
So that it can be used by prebuilt_apis in follow-up CLs. Bug: 220086085 Test: m nothing && inspect soong.variables Change-Id: If987b8aef9802c52a751ea5351cab2a3df6f2e00
2022-02-14Add sepolicy prebuilt API dirs to soong config Inseob Kim
Bug: 33691272 Test: build Change-Id: Ia7e750ea9d172d81d2ce0bc330e4f7f149c6fdb8
2022-01-29cosmetic: 1)typos 2)parameters named for clarity Usta Shrestha
Test: n/a Bug: n/a Change-Id: I49faa1d8dec4b729409a45e87212b271ecf9e9d1
2022-01-12Support `enabled` flag in product variable config Sam Delmerico
Some Android.bp modules have `enabled: false` but only use a product variable such as `source_build` to enable the module. Currently b2build does not handle this case at all. This commit adds the functionality to support this use case. Also, remove `__enabled` suffix in ProductVariable SelectKey. Bug: 210546943 Test: go test ./bp2build Topic: use_enabled_flag_product_variable_config Change-Id: I459c17a84c172df010666391066bf4d11d19253e
2022-01-10Merge "Use Module.GetProperties() instead of ModuleBase.generalProperties" Treehugger Robot
2022-01-08Use Module.GetProperties() instead of ModuleBase.generalProperties Usta
ModuleBase.generalProperties served the pupose of being a subset of ModuleBase.customizableProperties. But now with the removal of the latter, the former is simply a redirection to Module.GetProperties() Bug: 206961391 Test: m nothing and diff the ninja files Change-Id: I6dd8b7ba74eb5e7ffb61029b0f9129eec2ccfdaf
2022-01-07Add sepolicy compat versions to soong config Inseob Kim
Bug: 33691272 Test: build Change-Id: If90f25540e8fd46e5c76e2a59015d46dd020c431
2022-01-07Fix format Inseob Kim
Test: gofmt Change-Id: Ib88fea484cb8b71ae940fe8c21b2c687eba2d019
2021-12-23Merge "Introduce afdo" Yi Kong
2021-12-22Added src and exclude_src to debuggable builds Jay Aliomer
Fixes: 200976245 Test: manually tested Change-Id: I68b6230f30aa2c15e6a80010cd639ea453b4b29e Merged-In: I68b6230f30aa2c15e6a80010cd639ea453b4b29e (cherry picked from commit 85a8afa9e72feff6d804c5d0a0827db63cb55fb9) (cherry picked from commit 778582f4157a2a9c591fb6539dbca69a0c7fdb6b)
2021-12-21Introduce afdo Yi Kong
A new configuration rule for sampling PGO. This differs from the original pgo.go rule in the following ways: * Automatic propagation to static dependencies * Simpler configuration (just put `afdo: true` to optimsation targets) http://go/android-afdo Test: build Bug: 79161490 Change-Id: Ie194824cd523bca19e10ced41d2078fc598f13b3
2021-12-16Add sepolicy prebuilt directories to soong_config Inseob Kim
These are used when we build vendor sepolicy against old plat sepolicy. Bug: 33691272 Test: build Change-Id: Ia4fea509a2e122f24d1669a0908c4b3d2bb3b32c
2021-12-08Add BoardPlatVendorPolicy to soong config Inseob Kim
Bug: 205924657 Test: build Change-Id: Ia0fe4fd916e539ee04aa0e8343068cc03bd9787c
2021-12-06addSamplingProfileGatherFlags is no longer needed Yi Kong
We already add the "-fdebug-info-for-profiling" flag globally by default. Besides, Sampling PGO does not need additional target-specific build flags, unlike instrumentation PGO. This is preparation to separate out sampling pgo into a separate module. NFCI. Test: presubmit Change-Id: Icb28a98c021a78db25d8cb5ca9694ed6b7367a8d
2021-11-23Change type of Unbundled_build_apps from bool to []string Cole Faust
Unbundled_build_apps is supposed to be a list of apps to build as unbundled, not just a simple boolean. Change it to properly reflect what it is, because the starlark product configuration relies on soong's interpretation of variables types. Bug: 201700692 Test: Presubmits Change-Id: I85d40d58fe519f9f6e5a382b8f3ec9014f990aa1
2021-11-23Fix bp2build select generation for inter-attribute soong config Jingwen Chen
variable usage. There's bug a in the current soong_config_variable handling implementation where a soong_config_variable sets conditions_default value for an attr, and a non-conditions_default value for another attr. This results in the former attr not properly setting the zero value for the non-conditions_default select key, resulting in the pretty printer omitting the attribute totally. The current implementation in this CL ensures that the zero value is set whenever this happens at the module level. This is seen in library_linking_strategy_cc_defaults (see comments in code, and the new tests) Test: CI Bug: 198556411 Change-Id: Ibaeb94508c51a7429fb7a08df610cbb5470f76d2
2021-11-23Add support for merging defaults soong_config_module_types into bp2build Jingwen Chen
select statements. This supports defaults from the same or different namespaces, and transitively defaults as well. Test: soong unit tests Test: CI Change-Id: I99435bacfcfbfe20ad753b8021a1779531d7595a
2021-11-16Refactor ProductConfigProperties to use a struct key instead of an Jingwen Chen
string key with hardcoded patterns. This fixes a bug with label list conditions_default attrs where the attribute values get clobbered in a map with the keys "conditions_default" (with a default empty list) and "acme__feature__conditions_default" (with a non-empty list) when generating the LabelListAttribute. Test: CI Change-Id: I5429e40f747b7a0ed559f8a468a4831cd32df2c0
2021-11-08bp2build: add support for soong_config_module_type. Jingwen Chen
Test: CI, go unit test Bug: 198556411 Change-Id: Idf862904d51d822f92af0c072341c31b7a02fc64
2021-11-02bp2build: split Bazel conversion context into smaller ones, Jingwen Chen
and change TopDownMutatorContext signatures to use Bazel conversion context. This minimizes the context interfaces/functions actually needed to convert a module, and makes such interfaces easier to mock/test. Test: CI Change-Id: Id573d97023d59e06ef70e1f54437024d3f7aadbd
2021-10-25Add the device config GenerateAidlNdkPlatformBackend Jiyong Park
The config is used to force the generation of the AIDL ndk_platform backend which will eventually be removed in favor of the ndk backend. The switch is needed as an escape hatch for some devices whose BSP (outsourced and thus hardly modifiable) depends on the ndk_backend libraries. Bug: 161456198 Test: m Merged-In: Ie11ca62be05754bb2593da16e1380103c670b393 Change-Id: Ie11ca62be05754bb2593da16e1380103c670b393 (cherry picked from commit 65d9718328856b649efc76abf9ac4b6d0a2adcf6)
2021-10-13Add android_sdk_repo_host to build platform-tools&build-tools Dan Willemsen
The Android SDK has been built with Make up until now, monolithically, then split up into several sdk-repo zip files for different purposes. The Mac and Windows SDKs really only need to contain the platform-tools and build-tools pieces, but due to this monolithic sdk zip, we had to build the whole SDK first. This adds an `android_sdk_repo_host` module that can build these platform-tools and build-tools zips. Bug: 187222815 Change-Id: I55809e1d7447dd65e22461f921b2b8abb6d5f822
2021-09-27Merge "Add more sepolicy variables to soong_config" am: 208d2962f0 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826065 Change-Id: I25a8e93236a4bc76ea5654d7e999561b477d7fc9
2021-09-27Merge "Add more sepolicy variables to soong_config" Treehugger Robot
2021-09-25Merge "Add two new variables to Malloc_not_svelte." am: d8fd124227 Christopher Ferris
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1836134 Change-Id: Ib816cc29bcc07920dca08736c301ad9429d9b84a
2021-09-24Add two new variables to Malloc_not_svelte. Christopher Ferris
Add the srcs and header_libs for the system/core/debuggerd change to support removing scudo code on svelte configs. Bug: 201007100 Test: Builds. Change-Id: Iec083dc5cbfbc63334a72e2e77a53067786a85ca
2021-09-15Add more sepolicy variables to soong_config Inseob Kim
Bug: 33691272 Test: m selinux_policy on sc-dev Change-Id: I4a7288d5f4ff99233fbdb56a8fd92da2d6f2ef7d
2021-09-14Merge "Add module based host-tools snapshot" am: f6c37cc87d Rob Seymour
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1793067 Change-Id: I3a2bb2459677c14e3e99d654ed5ffb9b7dd09b21
2021-09-14Merge "Add module based host-tools snapshot" Rob Seymour
2021-09-13Add module based host-tools snapshot Rob Seymour
Add new module: host_snapshot { name: "host-snapshot" deps: [ (list of host tools) ], ... } Package host tools using android.PackagingBase to capture host tools and transitive packaging data. Add JSON meta data to snapshot that allows snapshot to be installed via development/vendor_snapshot/update.py Add support to generate a fake host snapshot of all host modules that is used to detect required modules via development/vendor_snapshot/update.py. Bug: 192556798 Bug: 194799048 Bug: 192896149 Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist -- check snapshot exists in dist Change-Id: I849c4db801cd858408f6fe6a3ce69262a23a5be9
2021-09-01Merge "Add support for extension version in variables" Anton Hansson
2021-08-31Add support for extension version in variables Anton Hansson
This makes the sdk extension version usable in genrule cmds via %d. Bug: 195281582 Test: current_sdkinfo module in packages/modules/common. Change-Id: I82a90b83d23b0ba3779a943c2ad444bf5cf937da Merged-In: I82a90b83d23b0ba3779a943c2ad444bf5cf937da (cherry picked from commit e720c41f67a7e9309f1e6e48d5975383be7b2d28)
2021-08-31Merge "cmdline property in bootimg can be customized for debuggable builds" ↵ Treehugger Robot
am: 4b2435bc79 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1813356 Change-Id: Ia4491bfb3c16e139bf40bde090c2274efea73b35
2021-08-31cmdline property in bootimg can be customized for debuggable builds Jiyong Park
This change adds product_variables.debuggable.cmdline so that the kernel cmdline arguments can be augmented for the debuggable builds. To support that the type of the property has changed to string array. Bug: 181936135 Test: inspect build.ninja Change-Id: I81b3ead5187ccb378efabb87d1d15fbdb59d8e2f
2021-08-27Add support for extension version in variables Anton Hansson
This makes the sdk extension version usable in genrule cmds via %d. Bug: 195281582 Test: current_sdkinfo module in packages/modules/common. Merged-In: I82a90b83d23b0ba3779a943c2ad444bf5cf937da Change-Id: I82a90b83d23b0ba3779a943c2ad444bf5cf937da
2021-08-14Merge sc-dev-plus-aosp-without-vendor@7634622 Xin Li
Merged-In: I10ff6a5df76852f0a22fe3ac22df764528f07423 Change-Id: I71f2397f425a46d346e49ac422d256d7e049c7a2
2021-08-11Add Platform_sdk_version_or_codename variable Yuntao Xu
1. Added a new product variable Platform_sdk_version_or_codename; 2. This variable is used to support the logic in the Android.bp file when either the Platform_sdk_version or the Platform_sdk_codename is used. Bug: 195986342 Test: m CtsThemeHostTestCases (the module where the product variable is used) Test: TreeHugger Change-Id: I6b952ce47fd4adc280aa3c7ef4185487558af9bc
2021-07-26Merge "Rename UpdatableBootJars to ApexBootJars." am: 4102c0cc47 am: adb9e9f752 satayev
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773912 Change-Id: Iecc5f48620b2d4e5390ab9a081b2193924bd0dda
2021-07-26Merge "Rename UpdatableBootJars to ApexBootJars." satayev
2021-07-24Merge "Reland "Split the x86 host toolchain into glibc and musl variants"" ↵ Colin Cross
am: dcbc76134d am: 632d3cf202 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1777148 Change-Id: Icca632d52e633a77b26e960bf11cb448d05bbf64
2021-07-23Merge "Revert "Split the x86 host toolchain into glibc and musl variants"" ↵ Colin Cross
am: c5647ca16e am: a199295f7a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1777147 Change-Id: Ie502ec0d1e461c7809175d8a27078e92bb9b7e00
2021-07-23Merge changes Idbeb4819,Ifc02f9e5 am: 7628e933b6 am: 038ac4c9bc Colin Cross
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1775369 Change-Id: Icb2f36d978b0aee2e883a510029a410d406d1ff3
2021-07-23Reland "Split the x86 host toolchain into glibc and musl variants" Colin Cross
Split the x86 host toolchain into glibc and musl variants Create new musl toolchains that are based on the existing glibc toolchains, and add the necessary flags for musl compiles. This relands Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546 with changes for I46672e3a096b6ea94ff4c10e1c31e8fd010a163c. Bug: 190084016 Change-Id: Iaa9f7a50ff601155ecd73acc5701a2c226be66dc Test: TestArchMutator
2021-07-23Revert "Split the x86 host toolchain into glibc and musl variants" Colin Cross
This reverts commit 4fb4ef22424162d73bb0473ff53dc557b3fec79f. Reason for revert: crossed with aosp/1775072 Change-Id: Ied922850b810d82627ba4f9ee42f672cfe286c91