Commit Graph

3641 Commits

Author SHA1 Message Date
Treehugger Robot
432eafcd76 Merge "Remove apex_available allowlist" into main am: b269e32d09 am: 546d05ceb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249711

Change-Id: Iba2d1be84f4d75f86a47173bf262761ac958ad9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-11 21:55:43 +00:00
Treehugger Robot
b269e32d09 Merge "Remove apex_available allowlist" into main 2024-09-11 21:50:57 +00:00
Treehugger Robot
6666d6bb1c Merge changes I505a7ad8,I92d88199 into main am: fae5ec8bbc am: 68168d7b56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3258011

Change-Id: I3ff37fd8fe971ffc9cab1fc164fe9885abad7015
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-06 06:27:44 +00:00
Treehugger Robot
fae5ec8bbc Merge changes I505a7ad8,I92d88199 into main
* changes:
  Disable source apex variant using apex_available_name
  Skip `contents` validation of source bootclasspath fragments
2024-09-06 06:07:42 +00:00
Spandan Das
003452ff9c Disable source apex variant using apex_available_name
There are two versions of aosp extservices - one for Tplus and one for
Sminus. When prebuilts are active, the `contents` validation of both
variants of extservices bootclasspath fragments should be disabled to
account for BCP jar skew.

This CL adds ApexAvailableName to ApexInfo to achive that. If an
api_domain matching the ApexAvailableName has been selected in
`all_apex_contributions`, the source apex variants will be disabled.

Bug: 361771739

Test: lunch cf_x86_64_phone-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I505a7ad8295c258e2eeef7f183669f7a75a1c88e
2024-09-06 05:10:41 +00:00
Spandan Das
1679192d7d Skip contents validation of source bootclasspath fragments
... if prebuilts are selected.

This is a special case of b/361771739 where a apex starts contributing a
jar to the BCP. `disableSourceApexVariant` uses
`PrebuiltSelectionInfoProvider` and this gets populated via the
following dep chain
```
source --> prebuilt --> all_apex_contributions
```

This runs into issues if a prebuilt bootclasspath_fragment does not
exist.

This CL creates a dependency edge between the source module and
all_apex_contributions singleton module so that
`PrebuiltSelectionInfoProvider` is available for
`disableSourceApexVariant`

Bug: 361771739
Test: lunch cf_x86_64-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I92d88199a27579d3c9879d40fd354653370efcce
2024-09-06 05:10:29 +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
Treehugger Robot
720df27693 Merge "apex: run host_apex_verifier" into main am: 19b81d777d am: 2b33af39c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2972873

Change-Id: Ieac7904745e4bfcb8be646fce2a444cec7839ebf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 17:23:18 +00:00
Colin Cross
ca3bf2be39 Merge "Move checkbuild targets of Soong modules into Soong" into main 2024-09-04 17:12:03 +00:00
Treehugger Robot
19b81d777d Merge "apex: run host_apex_verifier" into main 2024-09-04 17:07:45 +00:00
Jooyung Han
1955d600d6 Merge changes Ia9f2186e,Ibe567d3b into main am: 0a9eb7f657 am: e1b039d184
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3247637

Change-Id: I70cf56e14a9bc13b1c8499037f8ddca3e54b0dd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 01:40:10 +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
Jooyung Han
a3fddf40ca Refactor around apex aconfig files (#2)
Aconfig files are treated like other files in APEX. This way, we can
dedup the code hanlding those files (copy commands, fs_config, etc).

Bug: n/a
Test: m nothing --no-skip-soong-tests
Change-Id: Ia9f2186e4e54e92ad90c7a9c00474cb0f7519a31
2024-09-03 13:22:21 +09:00
Jooyung Han
6186ef9004 Refactor around apex aconfig files
We can iterate over the collection of apex file.

Bug: n/a
Test: m nothing --no-skip-soong-tests
Change-Id: Ibe567d3b251c54d656793dc443eb68fb9137f42f
2024-09-03 11:14:19 +09:00
Jooyung Han
2adba487bb apex: run host_apex_verifier
For now, the tool checks .rc files:
- .rc files are okay.
- services should run binary in apex.

Bug: 223896570
Test: m <apex>
Change-Id: I469c20afeff01cf10955ff2419113d6ac2d4cf45
2024-09-02 15:30:15 +09: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
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
Jooyung Han
a89a58ac1c Remove apex_available allowlist
Bug: 147364041
Test: m nothing --no-skip-soong-tests
Change-Id: I65ac605fe77a9e013a2c0b64adc36db414c77465
2024-08-29 13:00:33 +09:00
Priyanka Advani (xWF)
523efd1db1 Merge "Revert^3 "Implement detecting container violations."" into main am: 88a8daf8ca am: c2ba6683c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3248525

Change-Id: I81f89cb4da10d34d2de5c48093bf43a76b81d769
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 23:38:16 +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
2ad26bc6ea Merge changes Ia693c4a5,I8e5620d2 into main am: c14be38f1a am: 4e373a7904
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3247222

Change-Id: Ic901c1d2deef5f61e661cd07aa620b8ffdaf39df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 21:52:18 +00:00
Jihoon Kang
2a88491afc Revert^2 "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: Ia693c4a53369c757a3e96656a769405c759b111c
2024-08-28 18:01:25 +00:00
Satish Yalla
fa0019bf1f Merge "Revert "Implement detecting container violations."" into main am: f2d6e5004f am: b2407feae1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3244001

Change-Id: Iddc3110928d6d237de002dc65e033e7940e2b11e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 06:00:22 +00:00
Satish Yalla
f2d6e5004f Merge "Revert "Implement detecting container violations."" into main 2024-08-28 05:48:21 +00:00
Satish Yalla
b2b1ef63e2 Revert "Implement detecting container violations."
This reverts commit bb678f82d6.

Reason for revert: Droidmonitor created revert due to b/362639013. Will be verifying through ABTD before submission.

Change-Id: I1dcb71672eeb44a17cf176d3731bcaf9aaf81edf
2024-08-28 05:10:31 +00:00
Treehugger Robot
3b407afefb Merge "Implement detecting container violations." into main am: 26f071db92 am: 30f3795688
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3155659

Change-Id: If66625fe313efbbf9b50ebaee77e9ab718db58e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 04:51:30 +00:00
Treehugger Robot
26f071db92 Merge "Implement detecting container violations." into main 2024-08-28 04:39:12 +00:00
Treehugger Robot
ab740c544b Merge "dexpreopt rules for google mainline prebuilts with missing source" into main am: 529da9b897 am: cd08b3bfda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241767

Change-Id: Idbccd4c9d99c8a803a97a81c3ad29885aff30085
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 01:36:29 +00:00
Treehugger Robot
529da9b897 Merge "dexpreopt rules for google mainline prebuilts with missing source" into main 2024-08-28 01:25:52 +00:00
Treehugger Robot
3aca762ba7 Merge changes from topic "ctx_in_ideinfo" into main am: 9cbbafe300 am: e1028aa539
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3246818

Change-Id: Id12e0cbdeba1d100d7c755fbcf4336bc1f7c0554
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 01:01:20 +00:00
Treehugger Robot
9cbbafe300 Merge changes from topic "ctx_in_ideinfo" into main
* changes:
  Add ctx argument to IDEInfo()
  Add configurable property support to neverallow
2024-08-28 00:49:13 +00:00
Cole Faust
b36d31d870 Add ctx argument to IDEInfo()
The IDEInfo() methods read properties. To make those properties
configurable, we need a context to evaluate them with.

Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: I26d4b7084439b3006e50b02277298f74a929e1aa
2024-08-27 16:04:28 -07:00
Spandan Das
8a2c56c516 dexpreopt rules for google mainline prebuilts with missing source
AddFarVariationDependencies runs into issues in partner workspaces which
do not contain the sources of google mainline prebuilts, since the
prebuilt would be renamed in a prior prebuilt_rename mutator. To account
for this rename, add `prebuilt_` prefix in
`addDependenciesOntoSelectedBootImageApexes` to ensure that the prebuilt
apex does not get elided

Test: m nothing --no-skip-soong-tests
Test: in v-aml-prebuilt dev,
aninja -t query out/soong/dexpreopt_arm64/dex_bootjars_input/okhttp.jar | head -n3
out/soong/dexpreopt_arm64/dex_bootjars_input/okhttp.jar:
  input: g.android.Cp
    out/soong/.intermediates/vendor/partner_modules/ArtPrebuilt/prebuilt_com.google.android.art_compressed.deapexer/android_common/deapexer/javalib/okhttp.jar
(uses the prebuilt deapexed boot jar, and no the source apex boot jar)

Bug: 362163831
Change-Id: Ie94a36911ab40ac09a470efe505fd00ef3a5bf9c
2024-08-27 22:01:11 +00:00
Spandan Das
4c2221e8f0 Merge "Contents validation of override_apex's bootclasspath fragments" into main am: 39d61f53ff am: 8bd23c11bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241777

Change-Id: I5c0904ecd2136cde891f6f3144c679f07d711e86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 20:47:57 +00:00
Spandan Das
39d61f53ff Merge "Contents validation of override_apex's bootclasspath fragments" into main 2024-08-27 20:32:01 +00:00
Treehugger Robot
dc9fe3495d Merge "Add a property to rust_ffi targets to exclude them from APEXes." into main am: a5762dd78b am: 8617c2d1bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3236101

Change-Id: I152db50a2663efbc644edeadc41873644eb591ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 20:31:13 +00:00
Treehugger Robot
a5762dd78b Merge "Add a property to rust_ffi targets to exclude them from APEXes." into main 2024-08-27 20:13:19 +00:00
Spandan Das
8d3944aab2 Merge changes from topic "cc_prebuilt_stubs" into main am: a6f4b6b104 am: 87f001129a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3221926

Change-Id: Ic7a88d1113374f8934a570c1b8608080092c485f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 19:54:58 +00:00
Spandan Das
a6f4b6b104 Merge changes from topic "cc_prebuilt_stubs" into main
* changes:
  Skip `-Wl,--version-script` on libclang_rt.* stubs (temp hack)
  Special case the stubgen args for bionic libs
  Add stub generation support to cc_prebuilt_library
2024-08-27 19:37:08 +00:00
Spandan Das
ed7a030c6c Contents validation of override_apex's bootclasspath fragments
https://r.android.com/3083813 added support for overriding
min_sdk_version, and creating separate variants of transitive
dependencies of override apexes. This causes issues when there is a skew
between apex boot jars of source and prebuilt mainline modules. For
mediaprovider google apex, we now have _two_ source variants of
mediaprovider bcp fragment module.

This CL uses ApexInfo.BaseApexName to skip the check on both variants of
bootclasspath/systemserverclasspath fragments.

This CL also removes the prefix based check to determine if prebuilts
are active. If RELEASE_APEX_CONTRIBUTIONS for a specific mainline module
is set, it will be assumed that prebuilts for that mainline module are
active.

Test: go test ./apex ./java
Bug: 361771739

Change-Id: I01f7ef437df8f10b74ffa397ba461ff4f1f9bed6
2024-08-27 18:48:46 +00:00
Jihoon Kang
bb678f82d6 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: I36e9cd956c5a076a53635be0c6ff27f77725516e
2024-08-27 17:30:42 +00:00
Ashutosh Agarwal
46e4fad202 Add a property to rust_ffi targets to exclude them from APEXes.
This is a temporary measure until stubs are properly supported by rust_ffi targets.

Bug: 361441210
Bug: 362509506
Change-Id: Ieabd4e3abf442de660f39ec6c5776f5832b25e14
Test: manual
2024-08-27 17:13:12 +00:00
Spandan Das
2dc873402e Merge "Move installation rules of dexpreopt'd apex systemserver jars to soong" into main am: 18c2607bde am: 3f90d0bfe6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237119

Change-Id: I3ee21598635a4c6628e47357ff06a54dceaeda23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 22:45:33 +00:00
Spandan Das
18c2607bde Merge "Move installation rules of dexpreopt'd apex systemserver jars to soong" into main 2024-08-26 22:27:57 +00:00
Spandan Das
746161db0c Move installation rules of dexpreopt'd apex systemserver jars to soong
This will eventually allow us to build devices by skipping `katiBuild`
and moving straight to `katiPackaging`.

Implementation details
- Replace ctx.PackageFile with ctx.InstallFile. These makes these rules
  available to both make and soong packaging systems. This will be done
inside d.dexpreopt function
- Add InstallDepNeeded on the dependency tags in this chain
(apex --> sscp_fragment --> (java_library|java_sdk_library)). This is
necessary for the soong packaging system.
- Remove `LOCAL_SOONG_INSTALLED_MODULE=""`. A non-empty string ensures
  that kati honors the installation rules generated by soong.

Bug: 355509400
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug (mainline source)
Test: lunch cf_x86_64_only_phone-ap3a-userdebug (mainline prebuilts)
(no diff in system_intermediates/file_list.txt in both cases)

Change-Id: I190a919e9480e7d9981a6b9b96a50d9c33ceea02
2024-08-26 20:58:10 +00:00
Yu Liu
ade30511e1 Merge "Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap from ModuleBase." into main am: ad64c5f370 am: afb4e9440d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3236345

Change-Id: I8800b793a484b2cb086209e34ba75daf5d991f35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 19:11:21 +00:00
Yu Liu
bad1eef6d8 Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap
from ModuleBase.

The old packagingSpecsDepSet field is kept temporarily to bypass an
auto-merge issue, and will be removed in next change.

Bug: 358425833
Test: CI
Change-Id: I28b4933459c33224f756cc306cabc8088f9be862
2024-08-26 17:45:38 +00:00
Yu Liu
c6335186a4 Revert "Remove installFilesDepSet, packagingSpecsDepSet and lice..."
Revert submission 28945194-Remove installFilesDepSet

Reason for revert: will resubmit from aosp

Reverted changes: /q/submissionid:28945194-Remove+installFilesDepSet

Change-Id: I2a04998774da71ad0415958d7e1633a0833293f9
2024-08-23 19:04:39 +00:00
Yu Liu
8e5db7d26c Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap
from ModuleBase.

Bug: 358425833
Test: CI

Ignore-AOSP-First: a internal only project will be broken if submitting
AOSP first.

Change-Id: I2863265a01083d3c624c8a111be0531b519f1288
2024-08-22 20:54:50 +00:00
Treehugger Robot
b4445a0275 Merge "Remove apexFilesForAndroidMk from prebuilt apex module types" into main am: 5f42006902 am: da92d4238e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3233745

Change-Id: Ice2fe133fb6257d916a0f60b7615b5c10d6ee840
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-21 17:10:42 +00:00