Commit graph

463 commits

Author SHA1 Message Date
Yu Liu
67a28425a7 Validate aconfig libs are built with the correct modes.
Bug: 323071835
Test: Unit tests and manual tests.
Change-Id: I32de90826c7c8bb4d8495608e959d554820ab9a2
2024-03-07 18:51:16 +00:00
Jihoon Kang
35349466cd Convert the build flag RELEASE_EXPORT_RUNTIME_APIS to a product variable
RELEASE_EXPORT_RUNTIME_APIS build flag is currently used to modify the
filter condition for the "exportable" stubs, so that it exposes wider
set of flagged apis (ENABLED && READ_ONLY vs ENABLED || READ_WRITE).
This flag was originally introduced as a build flag to be enabled in
specific release configurations, but instead this is used as a product
variable that will be enabled in the product `sdk_with_runtime_apis`,
which will be introduced in a future change.

Test: m nothing --no-skip-soong-tests
Bug: 326312949
Change-Id: Ieb3cee517dd6cedcca844a9eab270aedf8199d4e
2024-02-22 20:10:22 +00:00
Jihoon Kang
b36fc547c0 Introduce product variable PRODUCT_HIDDEN_API_EXPORTABLE_STUBS
The new product variable behaves identical to the build flag
RELEASE_HIDDEN_API_EXPORTABLE_STUBS: if the variable is set to true, the
hiddenapi flags are generated from the "exportable" stubs (i.e. the
stubs that does not include READ_WRITE permission or DISABLE state
flagged apis) instead of the "everything" stubs (i.e. the stubs that
includes all flagged apis regardless of the state of the flags). If the
variable is set to false, the stubs are generated from the "everything"
stubs.

This product variable will be utilized for `sdk_with_runtime_apis`
product in the future changes.

Test: m nothing
Bug: 326310637
Change-Id: I8872d0b0617eb0f25da32611837ad823c77b0df7
2024-02-22 20:09:46 +00:00
Spandan Das
73f4a4a481 Merge "Revert "Revert "Create a product variable for skipping apex cont..."" into main 2024-02-20 07:53:03 +00:00
Spandan Das
8ab28dd61d Revert "Revert "Create a product variable for skipping apex cont..."
Revert submission 2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Reason for revert: The root cause CL has been reverted https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/build/+/26268799

Reverted changes: /q/submissionid:2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Change-Id: I93e8f60124a09b4fba4675ac7f128ab553102bf7
2024-02-17 03:31:45 +00:00
Treehugger Robot
3e48d693f4 Merge "Revert "Create a product variable for skipping apex contribution..."" into main 2024-02-17 02:24:02 +00:00
Jihoon Kang
3801a965d5 Revert "Create a product variable for skipping apex contribution..."
Revert submission 2964509-skip-apex-contributions

Reason for revert: 325666427

Reverted changes: /q/submissionid:2964509-skip-apex-contributions

Change-Id: I510e81c8e06803dc014c9f04c3e357065aa19ce5
2024-02-16 23:25:06 +00:00
Spandan Das
90db03c007 Merge "Create a product variable for skipping apex contribution contents" into main 2024-02-15 08:10:57 +00:00
Spandan Das
68a6e29ed5 Create a product variable for skipping apex contribution contents
This denylist will be used to ignore the prebuilt google apexes listed
in apex_contributions of vendor/google/build when building aosp products
in next.

Test: go build ./android
Bug: 308187268
Change-Id: Ib2c018a2aeda5578cf3f1a6a56253bf84850ba5f
Merged-In: Ib2c018a2aeda5578cf3f1a6a56253bf84850ba5f
2024-02-15 01:39:26 +00:00
Inseob Kim
dae1375433 Revert^2 "Remove unused ToTSepolicyVersion"
a1448e072e

Change-Id: I728d0633718669fb57877e7440dedf49ab980a00
2024-02-13 02:19:24 +00:00
Ikjoon Jang
a1448e072e Revert "Remove unused ToTSepolicyVersion"
Revert submission 2952245-vfrc_as_tot_sepolicy

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=mainline_modules_arm64-mainline-userdebug&lkgb=11421838&lkbb=11421957&fkbb=11421841, b/324335916

Reverted changes: /q/submissionid:2952245-vfrc_as_tot_sepolicy

Bug: 324335916
Change-Id: I803ccc4c2d1e96f9e36b9d91eebc3e18e50b238f
2024-02-08 02:54:43 +00:00
Inseob Kim
e9aa063b82 Remove unused ToTSepolicyVersion
Bug: 314010177
Test: build and boot
Change-Id: I31ff0135d71bc3a38a8ca057c27ae32f41997b2d
2024-01-29 17:30:38 +09:00
Treehugger Robot
2f08cfc77e Merge "Allow to change static_libs for variant" into main 2024-01-17 02:54:48 +00:00
Florian Mayer
ca2854e708 Allow to change static_libs for variant
This will be used to have different static_libs if we build with scudo.

Bug: 309446525
Change-Id: I5f755dd768975a1dff403bffa92cd5dbc3b9f573
2024-01-16 16:42:34 -08:00
Jihoon Kang
78b6b30aec Remove HideFlaggedApi() related logic and the related product variables
With the recent build changes to support generating mainlin module sdk
with flagged apis, the build no longer depends on the values of these
product variables in exposing the flagged apis, but these are determined
by the aconfig flags. Given that these variables are no longer used,
this change removes these variables and the variables dependent code.

Test: m nothing --no-skip-soong-tests
Bug: 320515715
Change-Id: I6af94da73cc7fc7ffce670928aad81cec5d383b4
2024-01-16 20:20:27 +00:00
Jiyong Park
3bb9924c87 Revert^2 "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
fbf1b5e7f1

Change-Id: I2b6c7866eac24b217197d5f659b37b2ae6b4207d
2024-01-04 23:22:41 +00:00
Sebastian Pickl
fbf1b5e7f1 Revert "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
Revert submission 2897682-dont_limit_systemsdk

Reason for revert: blocking revert for 318695834

Bug:318695834

Reverted changes: /q/submissionid:2897682-dont_limit_systemsdk

Change-Id: I4cf7268cba21c7b81b406c91240bb98190fa4ebc
2024-01-04 19:01:27 +00:00
Jiyong Park
87312a2fac 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: Id7901f85c221bc03fa1c15ef15dbec14b783a79a
2024-01-04 22:33:27 +09:00
Colin Cross
b63d7b3af7 Remove infrastructure to run bp2build
Bug: 315353489
Test: m blueprint_tests
Change-Id: Idcf6377d389b94c39e4e6ff4b8efa8a9f9e78b17
2023-12-08 13:51:07 -08:00
Vilas Bhat
b3d2d22a5d 16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro
This is part of a larger change to update the flag
PRODUCT_PAGE_SIZE_AGNOSTIC to PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO.
This is to help clarify that this flag doesn't mean the device
will actually work end-to-end with any page size.

Bug: 312541564
Test:
```
source build/envsetup.sh
lunch aosp_cf_arm64_phone_pgagnostic-trunk-userdebug
m
cat out/soong/build.aosp_cf_arm64_phone_pgagnostic.ninja | grep __BIONIC_NO_PAGE_SIZE_MACRO
```

Change-Id: I33033876d0d4a276d1bb962d40315b71a3968c66
2023-12-05 23:49:50 +00:00
Treehugger Robot
e0a5c5ae1d Merge "Define __ANDROID_VENDOR_API__" into main 2023-12-05 03:48:26 +00:00
Joe Onorato
3fefc23391 Add accessor function for bool product variables.
Test: treehugger
Change-Id: If6a59ba140d28696d1411ee5b5fcfc4fc0e97926
2023-12-04 17:36:22 +00:00
Justin Yun
41cbb5e9b5 Define __ANDROID_VENDOR_API__
cc modules can use __ANDROID_VENDOR_API__ to read BOARD_API_LEVEL
that is the API level of the vendor surface.

Bug: 313822931
Test: check ninja commands to have -D__ANDROID_VENDOR_API__=<version>
Change-Id: Iceb5918cbfce0f24929d02d7e3caf1e9942b88e8
2023-11-30 05:26:12 +00:00
Yi-Yo Chiang
939fe1a751 Deprecate BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK
These variables are no longer used. We don't build GKI in the platform
tree anymore. Remove these vars as we are not maintaining these.

Bug: 229701033
Test: presubmit
Change-Id: I7551aa37a049f3bc9252559a18feb0f6bdf0a548
2023-11-24 15:07:21 +08:00
Jihoon Kang
c1b04d6bc1 Revert^2 "Modify conditionals for BuildFromTextStub()"
This change modifies config.BuildFromTextStub() to return false when
deviceConfig.BuildFromSourceStub() is set to true.

This change resubmits https://r.android.com/2832580.

Test: m nothing
Bug: 311203379
Change-Id: I832364c3c42556e2b3aede2316e8927fd7163e91
2023-11-17 01:49:55 +00:00
Inseob Kim
e4e85d5f9f Export build flags to soong.
This exports a map of build flags used in this release config to Soong.

Bug: 302514918
Test: manual
Change-Id: Id95c03e14cfbb91c0cb9c8c37a065b8387733317
2023-11-08 04:01:38 +00:00
Cole Faust
11edf557b6 Add bazel-built modules as deps on the system image
These bazel-built modules will be installed into the system image
as part of the bazel rule, rather than going through the make staging
directory.

Bug: 297269187
Test: m bazel_sandwich
Change-Id: I96c6e58f8e0898b2ad92cb7069745ca2059a39f8
2023-10-18 15:21:14 -07:00
Yu Liu
eebb259356 Handle the case where the release value set is a list.
Bug: 304814040
Test: CI, unit test,
b build build/make/tools/aconfig:aconfig.test.cpp
b test build/make/tools/aconfig:AconfigJavaHostTest

Change-Id: I9ca939348a063c39e9528f24e788f9757458d30c
2023-10-13 16:45:51 -07:00
Alyssa Ketpreechasawat
2711ce2e1f Merge "Revert "Revert "Disable hiddenapi check for building from prebuilts.""" into main 2023-10-06 19:17:40 +00:00
Alyssa Ketpreechasawat
34ab8792c5 Revert "Revert "Disable hiddenapi check for building from prebuilts.""
This reverts commit bb6b813b1d.

Reason for revert: resubmit

Change-Id: I0ded78ed1a355654fa142351b95cd51f48c2186e
2023-10-06 07:01:23 +00:00
Alyssa Ketpreechasawat
affbb8d206 Merge "Revert "Disable hiddenapi check for building from prebuilts."" into main 2023-10-06 06:18:18 +00:00
Alyssa Ketpreechasawat
bb6b813b1d Revert "Disable hiddenapi check for building from prebuilts."
Revert submission 2761821-suppress-hiddenapi-check

Reason for revert: have some typo - break next build

Reverted changes: /q/submissionid:2761821-suppress-hiddenapi-check

Change-Id: I9fce1e1a9389d58928f1eec50c0eaf016f5f63ac
2023-10-06 03:42:34 +00:00
Alyssa Ketpreechasawat
5e0ee313e1 Merge "Disable hiddenapi check for building from prebuilts." into main 2023-10-05 23:51:29 +00:00
Justin Yun
ce12ea8f95 Merge "Generate product variants by default" into main 2023-10-04 06:29:31 +00:00
Jihoon Kang
a7e5e29ec1 Merge changes from topic "expose_flagged_api_revert" into main
* changes:
  Revert^2 "Add flagged api hide conditional to droidstubs"
  Revert^2 "Add soong config variable Release_expose_flagged_api"
2023-10-03 17:55:16 +00:00
Jihoon Kang
f3aa3225b6 Revert^2 "Add soong config variable Release_expose_flagged_api"
This reverts commit 5548bf3053.

Test: m nothing
Bug: 299570421
Change-Id: I9f70648fb6657bbf4f5681cd6d40517d70a8fefb
2023-10-03 01:00:42 +00:00
Cole Faust
6ed1e0fd59 Merge "AVB and selinux support in partitions" into main 2023-09-28 16:38:28 +00:00
Maxim Siniavine
5548bf3053 Revert "Add soong config variable Release_expose_flagged_api"
Revert submission 2755310

Reason for revert: Broken build b/302407753

Reverted changes: /q/submissionid:2755310

Change-Id: Ib5c01033882500296989a7c4476a723d95292aab
2023-09-28 01:01:59 +00:00
Cole Faust
b5055394a9 AVB and selinux support in partitions
Bug: 297269187
Test: m bazel_sandwich (updated partition_inspector to show selinux contexts, but still haven't figured out how to show avb information)
Change-Id: I6911c2fc75495f9722887925d8609c9a171901c6
2023-09-27 14:14:14 -07:00
Justin Yun
af1fde43f9 Generate product variants by default
PRODUCT_PRODUCT_VNDK_VERSION is set to 'current' by default. Now, we
can generate product variants without checking the
PRODUCT_PRODUCT_VNDK_VERSION build variable. Remove reading the
PRODUCT_PRODUCT_VNDK_VERSION variable from soong and generate product
variants by default.

Bug: 302255959
Test: m
Change-Id: I9a9b2076f4367c5ce9a393bbb206f8dee3884bd8
2023-09-27 16:36:40 +09:00
Jihoon Kang
03f1aa064a Add soong config variable Release_expose_flagged_api
The variable is a release config variable which will be used to
determine whether if the api marked @FlaggedApi is exposed or not.

Test: m nothing
Bug: 299570421
Change-Id: I5647608065543cf5059836f6d6e8906a23145541
2023-09-26 22:32:50 +00:00
Jihoon Kang
cfbc4077b3 Import make variable NextReleaseHideFlaggedApi to Soong
This change imports NextReleaseHideFlaggedApi exported from soong_config

Test: m nothing
Bug: 299570421
Change-Id: I410596a39d2ba9ad353c5cf48bd38b1e843633b2
2023-09-25 20:54:46 +00:00
Alyssa Ketpreechasawat
34feb68b28 Disable hiddenapi check for building from prebuilts.
Add ReleaseDefaultModuleBuildFromSource to config.productVariables and
use this parameter to disable hiddenapi check.

Test: DEFAULT_MODULE_BUILD_FROM_SOURCE=false m (not failing hiddenapi
check after disabling)
Bug: 301871981
Change-Id: I86b3f3bc21d546022a503a1c6a8a641d4e785565
2023-09-25 15:45:42 +00:00
Cole Faust
cb193ec471 Emit a system image target for the current product
This system image can be built with bazel instead of make.

Bug: 297269187
Test: m bazel_sandwich
Change-Id: I5fd61a28f664d8310435c3b7e5dbdd89a7ec6159
2023-09-22 14:42:33 -07:00
Liz Kammer
8e9ccda5d8 Merge "Don't panic for unhandled product vars" into main 2023-09-20 15:10:18 +00:00
Liz Kammer
9e2a5a7d6d Don't panic for unhandled product vars
Instead, we return an error. This allows us to access some product
variable information earlier when it will not be used as an attribute
without panicing

Test: m nothing
Change-Id: Id094b2b9e1364a8d174d99b3824fa149fb235b3e
2023-09-19 15:58:22 -04:00
Cole Faust
b4cb0c857f Move the android_platform next to it's entrypoint product config file
Because we're going to start generating partition images for the
product, and the partitions will eventually be checked in, we want
them to be in sensible locations. And the platform should be there as
well so all the targets for a product are co-located.

Bug: 297269187
Test: m nothing && b build --config=android //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Change-Id: Iaa25c44aa00295ada279d5fd49b5498bbafb89d5
2023-09-19 09:54:59 -07:00
Yu Liu
e6153b54bc Merge "Support aconfig_declarations, aconfig_values and aconfig_value_set" into main 2023-09-15 16:46:01 +00:00
Yu Liu
2cc802a442 Support aconfig_declarations, aconfig_values and aconfig_value_set
Bug: 297356603
Test: Unit tests
Change-Id: I2f797578a35322440db0f281b4d46b6652512e00
2023-09-09 12:33:40 -07:00
Cole Faust
ded796030b Allow actions to read BUILD_BROKEN_INCORRECT_PARTITION_IMAGES
To maintain good backwards compatibility with the legacy partition
building behavior, allow actions to read
BUILD_BROKEN_INCORRECT_PARTITION_IMAGES so that we don't have to rerun
analysis.

Bug: 205632228
Test: Presubmits
Change-Id: I2b55c0143cbdaf010e6b5fd0c3d51d6930a94eff
2023-09-08 15:58:13 -07:00