8781 Commits

Author SHA1 Message Date
Treehugger Robot
a136147c9c Merge "Add VINTF fragment modules into required libs of modules-info" into main 2024-09-05 01:46:19 +00:00
Colin Cross
c9b4f6b502 Use transitive header jars in classpaths
Skip combining jars into turbine-combined, combined, and withres jars
and instead collect transitive jars to use in the classpath and to
produce the final dexed jar.

This reduces the size of a `m checkbuild` in git_main by 11%, from
1300 KiB to 1154 KiB.  It may also improve caching and reduce uplink
network bandwidth when building with RBE, as now the classpath inputs
to rules are themselves outputs of previous rules and so already in
the RBE CAS.

The downside is that the classpath inputs to each rule are now much
longer, increasing the Soong ninja file size 11%, from 4.6 GiB to
5.1 GiB.  This could be mitigated in the future by supporting something
like depsets in the generated ninja file to reduce duplication.

Bug: 308016794
Test: TestSimple, TestKotlin, TestClasspath
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I2b7b4261375494370da70f98597c8719f1d561cf
2024-09-04 16:13:46 -07:00
Yu Liu
e97a9ce7cd Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main am: c55b25f125 am: 246315e4fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249489

Change-Id: Ib5b0b6fde2d99eb2c0b2c5d8f5595b194af91cd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 22:17:13 +00:00
Yu Liu
246315e4fd Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main am: c55b25f125
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249489

Change-Id: I43e2ee71097e95e313eab8631742acb8048e36d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 22:07:50 +00:00
Yu Liu
c55b25f125 Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main 2024-09-04 22:01:33 +00:00
Krzysztof Kosiński
918d265a06 Add ARMv9.2-a arch option.
Bug: 364383722
Test: presubmit
Change-Id: Ica7266f6dbac490836f94f7e19685383aba2749f
2024-09-04 21:25:05 +00:00
Yu Liu
26a716d5e5 Move the caching/restoring code from soong to blueprint to fully skip build actions.
Bug: 358425833
Test: Manually verified the generated ninja and mk files and CI.
Change-Id: Ieebb822c46f37c0ff55fad08531e9870a76cbd7b
2024-09-04 19:59:55 +00:00
Steven Moreland
350b54b8de Merge changes from topic "libbinder_ndk-remove-cpp-headers" into main am: 56aed2b0e8 am: 092389231f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3251042

Change-Id: Ia478843b8ea89927d577b903e49c127f2026e0be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 18:42:24 +00:00
Steven Moreland
092389231f Merge changes from topic "libbinder_ndk-remove-cpp-headers" into main am: 56aed2b0e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3251042

Change-Id: Ib543856a377c18f68a8bb5cad585bc787b04e5c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 18:33:08 +00:00
Steven Moreland
56aed2b0e8 Merge changes from topic "libbinder_ndk-remove-cpp-headers" into main
* changes:
  ndk_library: limit exports
  Reland "Truely re-export export_header_libs from ndk_library"
  ndk_library depends on the correct arch variant of cc_library_headers
2024-09-04 18:23:19 +00:00
Colin Cross
3946f9e367 Merge "Move checkbuild targets of Soong modules into Soong" into main am: ca3bf2be39 am: 5f0561e24d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237626

Change-Id: Ib035416676ead421eea1860e5420a2d8b987030e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:24:17 +00:00
Colin Cross
5f0561e24d Merge "Move checkbuild targets of Soong modules into Soong" into main am: ca3bf2be39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237626

Change-Id: Id72a093f81785ece92211cc63a73c0a53576fb7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:15:12 +00:00
Cole Faust
7811b45d38 Merge "Add tests for configurable PostProcessors" into main am: b9e7915f6f am: dcb8494f44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3247538

Change-Id: Id7a7dd333e0c0243d59dfdfc0181e86b4410dc07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:13:20 +00:00
Colin Cross
ca3bf2be39 Merge "Move checkbuild targets of Soong modules into Soong" into main 2024-09-04 17:12:03 +00:00
Cole Faust
dcb8494f44 Merge "Add tests for configurable PostProcessors" into main am: b9e7915f6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3247538

Change-Id: I4803d6148c6ed949a2b5a1c7aecf79fc80ec2a49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:00:58 +00:00
Cole Faust
b9e7915f6f Merge "Add tests for configurable PostProcessors" into main 2024-09-04 16:49:32 +00:00
Treehugger Robot
cf56cb9e63 Merge "Sandbox environment variables" into main am: 2f33c04a97 am: cc0bc1b3f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3245994

Change-Id: I4d1f1a067d1b4caadcd1fdfcea76ed939794a7d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 02:41:11 +00:00
Treehugger Robot
cc0bc1b3f9 Merge "Sandbox environment variables" into main am: 2f33c04a97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3245994

Change-Id: I2af033a7fbbef8928553efffe79b26d55d36e96a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 02:31:56 +00:00
Treehugger Robot
2f33c04a97 Merge "Sandbox environment variables" into main 2024-09-04 02:26:58 +00:00
Jiyong Park
67da923130 Merge "Make overrides work in Soong" into main am: b11c99d084 am: c299c20911
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241433

Change-Id: Ic9ff8fbf86a0a706038ce7d0c4a9ab9cf5f0dc89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 00:17:23 +00:00
Jiyong Park
c299c20911 Merge "Make overrides work in Soong" into main am: b11c99d084
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241433

Change-Id: Idff2325ba6387c43ffcfc2ec1403d2ec9f782aae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 00:07:03 +00:00
Jiyong Park
b11c99d084 Merge "Make overrides work in Soong" into main 2024-09-04 00:03:20 +00:00
Cole Faust
63ea1f966e Sandbox environment variables
So that the build can't access extra information unintentionally.
Particuarly ANDROID_BUILD_TOP is dangerous.

In the future PATH should be locked down as well.

Bug: 307824623
Test: Added a all_genrules target and built that
Change-Id: I88bb0efb0a82529a1c85875a53cf20c8384d07fe
2024-09-03 16:38:28 -07:00
Steven Moreland
0db999c45e ndk_library: limit exports
The NDK should stand alone, and the libbinder_ndk case
is created because libbinder_ndk in the NDK used to
contain extra C++ headers, but these were moved into
the SDK to be next to AIDL. Since many modules depend
on these headers, exports are only allowed for this case.

Bug: 357711733
Test: build with neverallow breaking, for instance:

error: frameworks/wilhelm/Android.bp:56:1: module "libOpenSLES.ndk" variant "android_x86_64_silvermont_sdk_shared_21": violates neverallow requirements. Not allowed:
        module types: ["ndk_library"]
        properties matching: "Export_header_libs" matches: .is-set
        EXCEPT in dirs: ["frameworks/native/libs/binder/ndk/"]

Change-Id: I9a32d3cb7f644fb5dbc1e8072894f2f585b2cd6d
2024-09-03 23:03:37 +00:00
Colin Cross
a6182ab2fa Move checkbuild targets of Soong modules into Soong
Pass the name of Soong's checkbuild target for each module to
Make so that it can depend on it from the main checkbuild rule.
This will give better control over which files get built, allowing
checkbuild to skip the jar combining step when transitive classpath
jars are enabled.  The per-module checkbuild targets are passed to
make instead of added directly as a dependency of checkbuild in order
to maintain the existing behavior of only building modules exposed
to make in checkbuild.

Also tweak the existing calls to CheckbuildFile and add
InstallFileWithoutCheckbuild to match the files that are
in the Make-based checkbuild.

Bug: 308016794
Test: m checkbuild
Change-Id: Ic5140819381d58f4d00f23a7a12447950c4cf268
2024-09-03 14:52:19 -07:00
Spandan Das
b8e47ebde5 Merge "HideFromMake in apexTransitionMutator should respect special cases" into main am: c965be6ca2 am: ed93a620c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249488

Change-Id: I543449187d32658ceb6ae30324825358e9d1cd12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-03 16:49:29 +00:00
Spandan Das
ed93a620c6 Merge "HideFromMake in apexTransitionMutator should respect special cases" into main am: c965be6ca2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249488

Change-Id: I4911340085cb4e41229a81875ff27c24c61a04ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-03 16:38:07 +00:00
Spandan Das
c965be6ca2 Merge "HideFromMake in apexTransitionMutator should respect special cases" into main 2024-09-03 16:32:29 +00:00
Jiyong Park
a574d535b5 Make overrides work in Soong
This change adds `overrides` property to all module types. It is used
to prevent another module (or modules) from being installed or packaged.

Bug: 330141242
Test: go test ./...

Change-Id: I4f05c603f0c5dbb699d00327882c7498472b59de
2024-09-02 19:58:38 +09:00
Yi Kong
0111a27449 Remove workaround for coverage boot failure
Bug: 269981180
Change-Id: I81399836b588b7a579174b1b6700341d7108d49e
2024-09-02 07:32:41 +00:00
Spandan Das
afa3add57e HideFromMake in apexTransitionMutator should respect special cases
At ToT, platform variants of modules are hidden from make, unless the module
has `//apex_available:platform` in its Android.bp file. However, there
are special cases which always require the platform variant to be
visible to make - e.g. bootstrap bionic libraries.

`markPlatformAvailability` handles these special cases. This CL updates
the subsequent apexTransitionMutator to hide the platform variant when
module.NotAvailableForPlatform is true in addition to the existing
module type specific `AvailableFor` check

Test: no diff in file_list.txt
Bug: 281077552
Change-Id: Ie9d7341e206276ff96d3d64fec21b8f5dcfd6ceb
2024-08-31 02:26:35 +00:00
Jihoon Kang
a5a744226b Merge "Revert^4 "Implement detecting container violations."" into main am: 7344482ff3 am: 9e40f8f9b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3248019

Change-Id: I77818bede2be74dc6755a55c5a8e69a1c6a7f64c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 20:31:34 +00:00
Jihoon Kang
9e40f8f9b4 Merge "Revert^4 "Implement detecting container violations."" into main am: 7344482ff3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3248019

Change-Id: I440053bd684fa56172b82b4012348bd0a93e84c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 20:21:28 +00:00
Jihoon Kang
7344482ff3 Merge "Revert^4 "Implement detecting container violations."" into main 2024-08-30 20:18:53 +00:00
Cole Faust
b93f7fe73c Add tests for configurable PostProcessors
Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: Iaaff66844ebe0b2fb19148bd07562785b12cd7e9
2024-08-30 13:04:37 -07:00
Treehugger Robot
0ecc6c1d64 Merge "Define additional non-vendor non-aosp container violations" into main 2024-08-30 18:01:44 +00:00
Jihoon Kang
7eef112eb1 Define additional non-vendor non-aosp container violations
These internal only violations are non-vendor. Without these allowlist
entries, branches without vendor will emit container violation errors
given that the internal allowlist is included in vendor/google/release
project.

Ignore-AOSP-First: Intended internal only change
Test: m nothing
Bug: 338660802
Change-Id: I417880c1689390ebdc9caabef705bce739bb0baf
2024-08-29 23:32:42 +00:00
Treehugger Robot
dd209716cc Merge "Add aconfig_storage_reader_java to the global container violation allowlist" into main am: 7a2a25492a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3248020

Change-Id: I9f5a38caa0104d798622fb63aab7e280885151bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-29 23:29:18 +00:00
Treehugger Robot
7a2a25492a Merge "Add aconfig_storage_reader_java to the global container violation allowlist" into main 2024-08-29 23:26:15 +00:00
Jihoon Kang
bf65d1b631 Add aconfig_storage_reader_java to the global container violation allowlist
The module is implicitly added as a dependency for all
java_aconfig_library modules, but does not generate the stubs.

Test: CI
Bug: 338660802
Change-Id: I6ef0f5f5f445e6f70debc3f79e3fd81ed2331366
2024-08-29 18:49:00 +00:00
Jihoon Kang
85bc193805 Revert^4 "Implement detecting container violations."
This change introduces a method to detect violating inter-container
dependencies between modules. The method is run in
`ModuleBase.GenerateBuildActions`, after the container info provider is
set. Given that the provider of the direct dependencies would have been
set at this time, the method utilizes this information to determine
the violations, which are introduced in https://r.android.com/3141104.

Note that this enforcement does not turn all inter-container
dependencies as errors. Instead, it will only turn dependencies that
matches the pre-defined violations into errors. Even if the dependency
matches the violation, an error will not be thrown if the dependency
satisfies any of the exception functions (e.g. the dependent module is
stubs, or the two modules belong to the same apexes).

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: Ib9ddc0761fa46f1309b1a1a4f759d9a4e04fd70e
2024-08-29 17:55:00 +00:00
Yu Liu
a53f951951 Merge "Remove containersInfo, complianceMetadataInfo and aconfigFilePaths from ModuleBase." into main am: 11d8b6e8d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3246821

Change-Id: I372ee0b7d6769706acee3887bf90ac3d9df20295
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-29 17:15:26 +00:00
Yu Liu
11d8b6e8d3 Merge "Remove containersInfo, complianceMetadataInfo and aconfigFilePaths from ModuleBase." into main 2024-08-29 17:07:05 +00:00
Kiyoung Kim
74408202e3 Add VINTF fragment modules into required libs of modules-info
Currently modules-info.json misses modules from vintf_fragment_modules
because it was not handled from Soong. This change adds
vintf_fragment_modules as part of required modules of modules-info.json
so it can be handled from any other logic handles build information with
the json file.

Bug: 322089980
Test: An artifact depends on the modules-info.json handles
vintf_fragments modules properly.

Change-Id: I09a61b2ed201099a9d3b05dbed061d0366bb9255
2024-08-29 17:46:44 +09:00
Priyanka Advani (xWF)
c2ba6683c5 Merge "Revert^3 "Implement detecting container violations."" into main am: 88a8daf8ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3248525

Change-Id: I7969a4be11e013e100f4be9fb13914244b094b7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 23:30:03 +00:00
Priyanka Advani (xWF)
88a8daf8ca Merge "Revert^3 "Implement detecting container violations."" into main 2024-08-28 23:20:03 +00:00
Priyanka Advani (xWF)
33b3a638a5 Revert^3 "Implement detecting container violations."
2a88491afc

Change-Id: Iba4527f391a093703978fe01177b56fec4604b28
2024-08-28 23:10:29 +00:00
Jihoon Kang
4e373a7904 Merge changes Ia693c4a5,I8e5620d2 into main am: c14be38f1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3247222

Change-Id: Id0c06c93eda0e4978d9df052542370f28e64da38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 21:43:02 +00:00
Jihoon Kang
c14be38f1a Merge changes Ia693c4a5,I8e5620d2 into main
* changes:
  Revert^2 "Implement detecting container violations."
  Define additional container violations
2024-08-28 21:35:16 +00:00
Jihoon Kang
4508ca9e70 Define additional container violation allowlist
These entries are proprietary, which are defined in vendor/google/build
in git_main, but vendor projects do not exist in
aosp-main-future-without-vendor branch. This change adds entries that
are supposed to be included in the future aosp release.

Ignore-AOSP-First: Intended aosp-main-future only change
Test: m nothing
Bug: 338660802
Change-Id: If48f56757e069a467a8ae0466820f27f97b011a8
2024-08-28 19:25:33 +00:00