Commit Graph

932 Commits

Author SHA1 Message Date
Colin Cross
8f1b033cf7 Add build flag to enable ResourceProcessorBusyBox by default
Setting the RELEASE_USE_RESOURCE_PROCESSOR_BY_DEFAULT build flag will
change the default for use_resource_processor from false to true.

Bug: 294256649
Test: builds
Change-Id: If643bf8db9e2e039200f63f4aac226ed5b44d9e0
2024-01-26 09:09:42 -08:00
Yi-Yo Chiang
88960aa827 cc: Vendor modules should NOT derive its "SDK" level from VNDK
Although vendor modules can be built bundled, they are technially not
part of the "platform", as it cannot access platform libraries (system
partition) directly.
They can only link to a restricted set of platform libraries (LLNDK),
and access restricted set of APIs.
We used to derive the LLNDK API level from the VNDK version. However
after VNDK deprecation, there is no "VNDK version" anymore.
Instead we would just derive the value from platform SDK version:
* If building an in-development build, build vendor modules against the
  in-development "current" API level.
* If building a REL / Final build, vendor should target the latest
  stable API.

Bug: 320423828
Test: go test
Test: presubmit
Test: build and boot
Change-Id: I2c5ef6530e9046b2dcc282bc1f020d8a505eab15
2024-01-23 12:43:38 +08:00
Treehugger Robot
c0412f5d31 Merge "Remove HideFlaggedApi() related logic and the related product variables" into main 2024-01-17 00:20:54 +00: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
Jihoon Kang
bd093457e2 Enable hiddenapi check for exportable stubs
This change modifies the dependencies of the hiddenapi to always depend
on the exportable stubs, instead of the currently utilized everything
stubs.

To support this, the full api surface exportable stubs are defined in a
separate change at the `frameworks/base` project. Note that the full api
surface exportable stubs are only used for the hiddenapi purpose, and
`sdk_version` continues to utilize the currently existing everything
stubs.

Currently, this feature is hidden behind the build flag
"RELEASE_HIDDEN_API_EXPORTABLE_STUBS". This feature will be fully
enabled once metalava fully supports handling of the flagged apis.

Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 317426356
Change-Id: I109b7cd27b20ceffcdf1766ab8106b0c276be2b3
2024-01-12 01:03:10 +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
31a674571e Write raw files to disk instead of the ninja file
Writing raw files as rules in the ninja file unnecessarily bloats
the ninja file.  Write files immediately to disk instead to files
based on the hash of the contents, and then emit ninja rules to
copy the files into place during the build.  Delete obsolete files
in a singleton at the end of analysis.

Bug: 306029038
Test: Run: m libc_musl_version.h
           touch build/soong/Android.bp
           m libc_musl_version.h
      libc_musl_version.h/genrule.sbox.textproto is not recopied.
Test: Run: lunch aosp_cf_x86_64_phone-userdebug
           m libc_musl_version.h
	   lunch aosp_x86_64-userdebug
	   m libc_musl_version.h
	   lunch aosp_cf_x86_64_phone-userdebug
	   m libc_musl_version.h
      libc_musl_version.h/genrule.sbox.textproto is recopied but restat prevents rerunning the genrule.
Test: Run: touch out/soong/raw-aosp_cf_x86_64_phone/00/foo
           touch build/soong/Android.bp
	   m nothing
      out/soong/raw-aosp_cf_x86_64_phone/00/foo is removed.
Change-Id: I172869c4d49565504794c051e2e8c1f7cf46486e
2023-12-19 16:33:46 -08:00
Treehugger Robot
392a56e26b Merge "Remove infrastructure to run bp2build" into main am: fa6995f75e am: 1fbc110ba7 am: d9c2df9601
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864664

Change-Id: I08fa8b09285278381da817ee8283ede481376315
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-12 21:49:13 +00:00
Treehugger Robot
fa6995f75e Merge "Remove infrastructure to run bp2build" into main 2023-12-12 20:03:58 +00:00
Yu Liu
3d9c6e9169 Merge "Remove the code for bazel when reading ReleaseAconfigValueSets." into main am: 65287d5dc2 am: 1a91da57f8 am: bac244d6cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864661

Change-Id: Ie6a3fe572b010c918dcb75a2d12d50a56daa3c3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 23:17:17 +00: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
Yu Liu
95572ff2da Remove the code for bazel when reading ReleaseAconfigValueSets.
Bug: 315353489
Test: CI
Change-Id: I652f78df6d9256cdb35b8b498e20bcb76f1437b3
2023-12-07 16:38:45 -08:00
Vilas Bhat
7d293bccbf Merge "16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro" into main am: 3ad4cf3a9a am: 3f2cdb2665 am: ce0ea6c649
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2857828

Change-Id: I5a141d687583b6c08fc4f2cee8f7e5e5fecf5e6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 15:29:33 +00:00
Aleksei Vetrov
73031fcc06 Merge "Move NDK ABI monitoring enabling flag to release flags" into main am: fb510be871 am: d193a77232 am: 255c274734
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2843703

Change-Id: Id381783bfcab66b9c83e198107f39822e0093b9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 13:49:28 +00:00
Vilas Bhat
3ad4cf3a9a Merge "16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro" into main 2023-12-06 13:16:19 +00:00
Aleksei Vetrov
146e9824c5 Move NDK ABI monitoring enabling flag to release flags
Currently NDK ABI monitoring is enabled by switching boolean flag in
soong code. When this flag is switched, it will enable ABI monitoring in
all release configurations at once.

This change moves the flag from soong code to the trunk-stable flags
framework ("build/release/build_flags.scl") that allows to enable it
only in specific configurations like "trunk-staging".

Test: TH
Bug: 156513478
Change-Id: Ibb810a834c0d756b22782b1a2d8ec5a5e575a4b3
2023-12-05 23:52:46 +00: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
813fec2974 Merge "Define __ANDROID_VENDOR_API__" into main am: e0a5c5ae1d am: 2438f09e0d am: b9555e56b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2851889

Change-Id: I0df6151fa4dd3eb6d24deee34af18ca97b61d8a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 05:15:53 +00:00
Treehugger Robot
e0a5c5ae1d Merge "Define __ANDROID_VENDOR_API__" into main 2023-12-05 03:48:26 +00:00
Roshan Pius
66b10a7ffa Merge "soong(nfc): Create framework-nfc sdk library" into main 2023-12-01 17:12:39 +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
Roshan Pius
a68c2e9748 Merge "soong(nfc): Create framework-nfc sdk library" into main 2023-11-17 22:43:35 +00:00
Roshan Pius
a966a35e94 soong(nfc): Create framework-nfc sdk library
Using `framework-location` as reference.

Ignore-AOSP-First: Submitting separately to avoid merge conflicts. See
aosp/2828288
Bug: 303286040
Test: Device boots up after flashing
Test: atest CtsNfcTestCases

Change-Id: I309e76165f5563147dde5e581316ee4ac463fbc4
2023-11-17 14:40:20 -08:00
Roshan Pius
92307ffa58 soong(nfc): Create framework-nfc sdk library
Splits out the NFC API classes that are going to be part of NFC mainline
module. Uses `framework-location` as reference.

Bug: 303286040
Test: Device boots up after flashing
Test: atest CtsNfcTestCases
Merged-In: I309e76165f5563147dde5e581316ee4ac463fbc4
Change-Id: I309e76165f5563147dde5e581316ee4ac463fbc4
2023-11-17 22:37:59 +00:00
Alyssa Ketpreechasawat
4217b56588 Merge "Revert "Revert "Added new framework-pdf jar inside MediaProvider..."" into main am: afd6963ab4 am: 103a95acf9 am: 7d0fd015a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822534

Change-Id: I6375050c50478f0872fe3a24c6d2e4d9490a742c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 11:40:05 +00:00
Jihoon Kang
b02789c513 Merge "Revert^2 "Modify conditionals for BuildFromTextStub()"" into main am: d8dd46e5be am: 99b1e8133d am: 6213c4c7b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835958

Change-Id: I989b30ed6aeb1f23cbce8165fe1c6e3306b22dd3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 11:39:14 +00:00
Alyssa Ketpreechasawat
afd6963ab4 Merge "Revert "Revert "Added new framework-pdf jar inside MediaProvider..."" into main 2023-11-17 10:30:16 +00:00
Jihoon Kang
b4e5ddd22d Merge "Revert "Modify conditionals for BuildFromTextStub()"" into main am: 88d5104ca1 am: a7fa500d0b am: e05655ac90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835871

Change-Id: I2f0c0b01598cd30ffd6ac0897b1fb48bf2ad39b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 02:08:21 +00:00
Treehugger Robot
940c7fb0c5 Merge "Modify conditionals for BuildFromTextStub()" into main am: 72a8cee8fe am: 404fd1cce8 am: 48cbd06e68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832580

Change-Id: Id507ee1e8ba631427eac3a3a74de2929c5d15766
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 02:07:49 +00: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
Jihoon Kang
77f6ca4919 Revert "Modify conditionals for BuildFromTextStub()"
Revert submission 2832580-sdk-from-source-stub

Reason for revert: Breaking sdk builds
Reverted changes: /q/submissionid:2832580-sdk-from-source-stub

Change-Id: I447e0832950a1aa91df0aed348bdec01528d568d
2023-11-17 00:58:40 +00:00
Jihoon Kang
33e39ae583 Modify conditionals for BuildFromTextStub()
This change modifies config.BuildFromTextStub() to return false when
deviceConfig.BuildFromSourceStub() is set to true.

Test: m nothing
Bug: 311203379
Change-Id: I3b56881fbe2565da20e23470398bf6550c618fb0
2023-11-16 23:02:47 +00:00
Jihoon Kang
eecb95f35b Merge "Add environment variable BUILD_FROM_SOURCE_STUB" into main am: 37d679df33 am: 404bf92c95 am: 9d4a61d46b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2831230

Change-Id: Ia9373171a57dbcabf8772e5a37b36d3d070eaafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 18:30:43 +00:00
Jihoon Kang
7c1958f0f4 Add environment variable BUILD_FROM_SOURCE_STUB
On top of the soong build flag --build-from-source-stub, the user can
configure build to generate stubs from source Java files by setting the
environment variable BUILD_FROM_SOURCE_STUB=true.

Test: m nothing
Bug: 310279899
Change-Id: I0c5247558455f09b8fc208d988aab3b60bf0ff16
2023-11-15 00:34:43 +00:00
Jihoon Kang
bb61391aba Merge "Revert^2 "Default from-text stub generation in build"" into main am: 8c4387e478 am: 1a062bab81 am: 32fbd4a02b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2807659

Change-Id: If91cc1a8e7d00e275392ccbec65d511459fda14e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-10 05:29:32 +00:00
Jihoon Kang
8c4387e478 Merge "Revert^2 "Default from-text stub generation in build"" into main 2023-11-10 04:10:24 +00:00
Spandan Das
e9f86b6b0b Merge changes from topic "apex_contributions_build_flags" into main am: c31b24977e am: e48000d86f am: 874d391f63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808754

Change-Id: Iea3c3e3ac6b9ae49c2b54bf78831495b19637df4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 03:17:22 +00:00
Spandan Das
e3fcb41ff7 Create a singleton all_apex_contributions module type
This will be a container for the the apex_contributions
selected using build flags. This module will be used to query the state of
selected apex contributions instead of a global that can be mutated by
anyone.

It will set a provider containing metadata for source vs prebuilts
selection. To reduce the overhead of a new mutator, this will be done in
the existing `prebuilt_select` mutator.

It will validate that there are no dups (`foo` and `prebuilt_foo` cannot
be both selected)

Bug: 308174923

Test: go test ./android

Change-Id: Ie42999a71f35d70e0e977f5ab07ce451608d9f35
2023-11-08 18:37:18 +00:00
Alyssa Ketpreechasawat
9f63436385 Revert "Revert "Added new framework-pdf jar inside MediaProvider..."
Revert submission 2775627-revert-2759049-framework-pdf-UAOVGTHHXO

Reason for revert: submit together with the fix to allow this new jar to coexist w/ mainline prebuilts

Reverted changes: /q/submissionid:2775627-revert-2759049-framework-pdf-UAOVGTHHXO

Change-Id: I877af450918647524d7e24371fb3343a8a2900dc
2023-11-08 16:03:58 +00:00
Treehugger Robot
8f14181875 Merge "Export build flags to soong." into main am: 2ab031f467 am: 1d6e69cda7 am: 5ef54931f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2803674

Change-Id: I52af4213a59f60378f0c1679ae19f00a3dea4c34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 05:57:57 +00:00
Jihoon Kang
2a929ad250 Revert^2 "Default from-text stub generation in build"
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.

This change relands aosp/2617457.

Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 301522358
Change-Id: Ic129dafc3231e71470af982374739930947b69cb
2023-11-08 04:25:52 +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
Alyssa Ketpreechasawat
0788a7e8bf Merge "Disable verify_overlaps test instead of hiddenapi check." into main am: 98e555c842 am: aa91b88610 am: d186d78927
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2816955

Change-Id: I34abbaea5c2114fdd5bd56878482879509181a8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-06 12:46:55 +00:00
Alyssa Ketpreechasawat
7daf2786b6 Disable verify_overlaps test instead of hiddenapi check.
Disabling hiddenapi check entirely can be dangerous and it might change the
accessibility of @hide Api too. We should only disable verify_overlaps
test which is required for module_sdk and apexes mismatch.

Test: atest CtsInlineMockingTestCases
Bug: 308187068
Bug: 307480026
Change-Id: I44f48e85d802b3a8f2711bc2047bdab721369f08
2023-11-06 09:49:16 +00:00
Sebastian Pickl
2e196473d0 Revert "Default from-text stub generation in build"
This reverts commit 182b56b870.

Reason for revert: breaking boot tests b/307495247, b/307411752

Bug:307495247
(cherry picked from https://android-review.googlesource.com/q/commit:1c4188c9da7b55cdae967e2d2a0a3c9a51c0ad9f)
Merged-In: Iea05703b767d2699ca3cf69377eb44b1d21697ad
Change-Id: Iea05703b767d2699ca3cf69377eb44b1d21697ad
2023-10-24 12:46:36 +00:00
Anton Hansson
05eabd9c4d Merge "Created empty framework-location non-updatable module" into main 2023-10-24 12:43:36 +00:00
Sebastian Pickl
1c4188c9da Revert "Default from-text stub generation in build"
This reverts commit 182b56b870.

Reason for revert: prime suspect for breaking boot tests b/307495247, b/307411752

Bug:307495247
Change-Id: Iea05703b767d2699ca3cf69377eb44b1d21697ad
2023-10-24 11:20:06 +00:00
Jihoon Kang
58c55df235 Merge "Default from-text stub generation in build" into main am: 82f0f7eca1 am: 7e27c69da1 am: 3efc4ce811
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2617457

Change-Id: I3c1245e95bb785dcd118023632d48eeb202600a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-23 22:42:51 +00:00