Commit graph

361 commits

Author SHA1 Message Date
Jihoon Kang
5a438e61ba Remove RELEASE_EXPOSE_FLAGGED_API and PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API export
As seen in the CLs in the same topic, these two variables are no longer
in used and do not need to be exported to Soong.

Test: m nothing --no-skip-soong-tests
Bug: 320515715
Change-Id: I268dc3f051d3ff15d95515755dd0c9f9c15dfc82
2024-01-16 20:09:50 +00:00
Jiyong Park
885b004547 Revert^2 "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
5ef2634d5a

Change-Id: I4430ac4b2411baf3f33695ba3b1520345d7f493d
2024-01-04 23:23:38 +00:00
Sebastian Pickl
5ef2634d5a 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: Ic4a63fe81434ddb9cb57519bd11c1924224111c6
2024-01-04 19:01:29 +00:00
Jiyong Park
7a0e042276 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: Ie70ce428ec3df8580099efd99e5c7c9c4f9daecb
2024-01-04 23:48:27 +09:00
Vilas Bhat
f464d39aed 16k: core: 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
Change-Id: I584282ab5623003721c0c32483a842de1b4f9ef9
2023-12-05 22:01:08 +00:00
Vilas Bhat
01e2b98ca8 16k: core: Update 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. Renaming
several dependent variables will be done in subsequent patches.

Bug: 312541564
Test:
```
 $ source build/envsetup.sh
 $ lunch aosp_cf_arm64_phone_pgagnostic-trunk-userdebug
 $ get_build_var TARGET_NO_BIONIC_PAGE_SIZE_MACRO
 true
```
Change-Id: I9bae8b00139f601a3324da902aeb4ae82113ccdd
2023-12-05 21:59:31 +00:00
Justin Yun
2c583744cb 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: I868b88ae72b4f60bc3d5ad567fbacd2222dd62d7
2023-11-30 05:30:48 +00:00
Yi-Yo Chiang
f061800468 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: If8c978a07094da6a651c1e3f06a437dea9ef52b9
2023-11-24 15:04:33 +08:00
Jihoon Kang
9e0998b777 Revert^2 "Disable from-text stub build for sdk products"
This change introduces `PRODUCT_BUILD_FROM_SOURCE_STUB` product
variable, which is set to true for sdk targets.

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

Test: m TARGET_PRODUCT=sdk TARGET_RELEASE=trunk_staging sdk and inspect ninja query to verify that stubs are built from source
Bug: 311203379
Change-Id: I7d9f833ae76ceabbf2ce4df0141688e24ea164c8
2023-11-17 01:52:12 +00:00
Alyssa Ketpreechasawat
c7bc53999d Merge "Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled." into main 2023-11-14 19:13:32 +00:00
Alyssa Ketpreechasawat
ba231d2084 Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled.
framework-pdf is newly added framework jar which is not yet included in
the actual prebuilt apex. Thus, we add it PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY. The APEX_BOOT_JARS_EXCLUDED will be created based on PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY and will be removed from ApexBootJars.

Bug: 304719212
Test: lunch cf_x86_phone-next-userdebug & m
Test: lunch cf_x86_phone-trunk-userdebug & m
Change-Id: I9902131629900fbd629b8560a422ed8c2b06073c
2023-11-13 13:22:32 +00:00
LaMont Jones
99845eeaba Export build flags to soong.
This exports a map of build flags used in this release config to Soong.

Bug: b/302514918
Test: manual
Change-Id: Ia93195f09dee4945f07326eb7a5973c2ce2e025b
2023-11-01 16:16:53 +00:00
Cole Faust
2fc2709115 Merge "Revert^2 "Enable genrule sandboxing by default"" into main 2023-10-19 23:10:55 +00:00
Cole Faust
b0990300e9 Revert^2 "Enable genrule sandboxing by default"
50cd6b2a18

Change-Id: Ie0be9331481eb1e9b96034b155efb76a8be9596a
2023-10-18 22:50:28 +00:00
Mateusz Cicheński
50cd6b2a18 Revert "Enable genrule sandboxing by default"
Revert submission 2782270-genrule_sandboxing_by_default

Reason for revert: Potential culprit for b/305851039 and many other build breakages - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:2782270-genrule_sandboxing_by_default

Change-Id: I3a8eb5d3a6a9e0d51ed7798c99187e9ca236b7bd
2023-10-17 17:36:43 +00:00
Cole Faust
fa7445da12 Add PRODUCT_PACKAGES to soong.variables
Bug: 297269187
Test: m bazel_sandwich
Change-Id: Iea8877b7fe56f7cd0e5e227ce0e6597bdc708162
2023-10-16 18:27:23 -07:00
Yu Liu
82ae713895 Merge "Handle the case where the release value set is a list." into main 2023-10-14 03:27:30 +00:00
Yu Liu
6ff41107dd 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: Ie9063a6c0bd08f96e0593bad8cb731d826b25fea
2023-10-12 20:36:41 -07:00
Cole Faust
865d19e214 Enable genrule sandboxing by default
Now that all the failing genrules have been denylisted.

Also add BUILD_BROKEN_GENRULE_SANDBOXING to disable this behavior.

Bug: 290816499
Test: Presubmits
Change-Id: Id7612065ddc976a088ea1ac4c2d959dadf2b845c
2023-10-11 15:24:31 -07:00
Vinh Tran
72b7fab580 Add afdo profiles in AOSP to AfdoProfiles product var
Test: m libbinder and inspects build command
Change-Id: Ia72bb7e1baa5790c73cb0213217258517b09c5e9
2023-10-11 11:25:39 -04:00
Alyssa Ketpreechasawat
8028a4c59f Merge "Revert "Revert "Add RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE in config.""" into main 2023-10-06 19:17:40 +00:00
Alyssa Ketpreechasawat
0c75ea8ca7 Revert "Revert "Add RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE in config.""
This reverts commit 55702a7fb4.

Reason for revert: resubmit

Change-Id: I5ddb51159e69045ac6c370fdcd11f6bd9f86dd65
2023-10-06 07:01:03 +00:00
Alyssa Ketpreechasawat
20ef679451 Merge "Revert "Add RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE in config."" into main 2023-10-06 06:18:18 +00:00
Alyssa Ketpreechasawat
55702a7fb4 Revert "Add RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE in config."
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: I24f91b77f76cf0950d407aee3dedc30412213d00
2023-10-06 03:42:42 +00:00
Alyssa Ketpreechasawat
eda7bebd77 Merge "Add RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE in config." into main 2023-10-05 23:51:30 +00:00
Justin Yun
f81405aab0 Merge "Remove PRODUCT_PRODUCT_VNDK_VERSION from soong_config" into main 2023-10-04 06:29:31 +00:00
Jihoon Kang
a65cdd5024 Merge "Revert^2 "Add soong config variable Release_expose_flagged_api"" into main 2023-10-03 17:55:17 +00:00
Jihoon Kang
00328e40be Revert^2 "Add soong config variable Release_expose_flagged_api"
This reverts commit 453d74ba48.

Change-Id: Ic5cc83ebe396ccf05b51b8306b79a61dbb689807
2023-10-03 01:02:07 +00:00
Cole Faust
b78b334041 Merge "Add extra variables to soong.variables" into main 2023-09-28 16:38:28 +00:00
Maxim Siniavine
453d74ba48 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: If2b09e6609cdd4c47eea12cb2d877c3874e0560b
2023-09-28 01:02:02 +00:00
Cole Faust
c874c70f45 Add extra variables to soong.variables
Also always use BUILD_NUMBER_FROM_FILE in the BUILD_FINGERPRINT.
The build number file now always exists, even if HAS_BUILD_NUMBER is
false.

Bug: 297269187
Test: m bazel_sandwich
Change-Id: Idf745b600b167e5cec161e07139be09a037bdc13
2023-09-27 13:44:56 -07:00
Justin Yun
cd7c0300b5 Remove PRODUCT_PRODUCT_VNDK_VERSION from soong_config
We can remove PRODUCT_PRODUCT_VNDK_VERSION safely as soong does not
read it.

Bug: 302255959
Test: m
Change-Id: I1d4080b8e6f8b04c0c1333bcd9bf055d329fdd71
2023-09-27 16:38:13 +09:00
Jihoon Kang
ccebab160e 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: Iad902b5ceb2e6d6e9f8fc3b81d54ce3d1896f9eb
2023-09-26 22:32:37 +00:00
Jihoon Kang
596d514744 Merge "Add PRODUCT_NEXT_RELEASE_HID_FLAGGED_API for sdk targets" into main 2023-09-26 17:49:25 +00:00
Alyssa Ketpreechasawat
a6292d3fde Add RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE in config.
Bug: 301871981
Test: m (build from prebuilts)
Change-Id: Ic654cbc18992310e24a7d9334fcad4449d5c34f2
2023-09-25 15:26:13 +00:00
Cole Faust
2d90efb1a4 Add partition-related variables to soong_config.mk
So that bp2build can use them to produce partition images.

Bug: 297269187
Test: m bazel_sandwich
Change-Id: Id7a13fe1d575e87fb901fb089fb79a5722c4923c
2023-09-22 15:52:37 -07:00
Jihoon Kang
e06e4c5037 Add PRODUCT_NEXT_RELEASE_HID_FLAGGED_API for sdk targets
PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API added to the sdk targets will be used to determine whether to exclude flagged apis for next release or not.

Test: m TARGET_PRODUCT=sdk nothing
Bug: 299570421
Change-Id: I00cb84341a05e296a0c747d4921ed5fe445eabe6
2023-09-20 19:53:04 +00:00
Cole Faust
c7dcd2629a Add ProductDirectory variable to soong_config.mk
Bug: 297269187
Test: m nothing
Change-Id: Ib14ce9d911c86afb5bb770c4b05977021e771c0f
2023-09-18 13:07:22 -07:00
Yu Liu
fc68cf4d45 Merge "Support aconfig_declarations, aconfig_values and aconfig_value_set" into main 2023-09-15 16:46:01 +00:00
Yu Liu
d793c271c3 Support aconfig_declarations, aconfig_values and aconfig_value_set
Bug: 297356603
Test: Unit tests
Change-Id: Iefa0e056cd6185499ffa92492b261c31a5d27af2
2023-09-11 10:57:16 -07:00
Cole Faust
152cdfab7c Clean staging dirs in build_image.py
build_image.py now accepts a --input-directory-filter-file argument
that contains a list of files to consider from the input directory.
A new, temporary input directory will be created, and only the
considered files will be copied to it.

This removes most of the need for `m installclean`, as old files or
files built manually will no longer end up on the partition.

Bug: 205632228
Test: Presubmits
Change-Id: I07e0bf8e840abf0b51a2fdf67b758905fb3c5b5b
2023-09-08 16:24:26 -07:00
Treehugger Robot
ed234171f8 Merge "make: HWASan exclude path support" into main 2023-09-06 01:14:12 +00:00
Inseob Kim
c36ff859e9 Remove code about mixed sepolicy build
There is no one actively using mixed sepolicy build, and it made
sepolicy codes too complicated. As we are deprecating mixed build,
removing such code for cleanup.

Bug: 298305798
Test: boot cuttlefish
Change-Id: I6efcfd7bde398564f909b41b3e156ac3d98d64d6
2023-08-31 16:52:04 +09:00
Inseob Kim
3c7b91bac1 Use board api level for seapp coredomain check
Rather than PRODUCT_SHIPPING_API_LEVEL, use board api level
(BOARD_API_LEVEL or BOARD_SHIPPING_API_LEVEL) to determine whether we
check coredomain violations or not.

Also provides a Makefile variable to override the flag, for targets that
want to turn on the check optionally.

Bug: 280547417
Test: see build command of vendor_seapp_contexts
Change-Id: I177630d33313334ca4a56a9be88b78cff678281e
2023-08-28 07:33:12 +00:00
Inseob Kim
a26d098160 Revert "Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN"
Revert submission 2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN

Reason for revert: not needed

Reverted changes: /q/submissionid:2715179-BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN

Change-Id: Ib8612049314dbe26a913cc97b8c835fad4f03824
2023-08-23 02:07:53 +00:00
Tomislav Novak
d8febc98b3 make: HWASan exclude path support
Like aosp/2495518, but adds the ability to centrally disable HWASan
for multiple modules when building with SANITIZE_TARGET=hwaddress.

HWASan takes precedence over CFI and several other sanitizers that it's
incompatible with[1], which can be problematic for modules that require
those sanitizers (e.g. those that depend on vendor prebuilts where only
sanitized variants are provided). This patch adds an easy way to disable
HWASan for such modules while still keeping it globally enabled.

Test: build with HWASAN_EXCLUDE_PATHS set and verify with readelf that
      relevant modules have no references to __hwasan symbols

[1] bb31ca1168/core/config_sanitizers.mk (236)

Change-Id: I64185b570bc64e61680c3212934a02d80a4904b9
2023-08-22 18:15:04 +00:00
Inseob Kim
30cbf0b853 Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN
Starting from Android V, vendor seapp_contexts files can't assign
coredomain to vendor apps, as it's Treble violation. This build broken
variable is to suppress the enforcement for devices launching with U or
prior.

Bug: 280547417
Test: set BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN := true and build
Change-Id: If4035e6cbd0c62a1111241d94ed0a3923f61247b
2023-08-18 18:13:54 +09:00
Zhi Dou
5f81b7dc96 Merge "aconfig: add default-permission argument for create-cache command" into main 2023-08-14 14:12:27 +00:00
Zhi Dou
24a0b6a20c aconfig: add default-permission argument for create-cache command
Aconfig set flag default permission as READ_WRITE regardless of the
release configuration. This change enables the caller of create-cache to
set the default permission for all flags, if the flag doesn't have a
value.

Test: atest aconfig.test
Bug: 294417368
Change-Id: I1ba19e1ba793cd2ae59923b136b9b50a92315ece
2023-08-10 21:39:59 +00:00
Juan Yescas
d94d6bc9ad core: Rename product variable Device_page_size_agnostic
The product variable Device_page_size_agnostic will be
renamed to DevicePageSizeAgnostic.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_phone_pgagnostic
      m
Bug: 289419664
Change-Id: I4c0026a559ca3d848ccad285a5516a56d01c0efb
2023-08-09 09:04:43 -07:00