Commit Graph

933 Commits

Author SHA1 Message Date
Rico Wind
a7b38592f8 Launch flag guarded always on optimized resource shrinking
This will use the RELEASE_USE_OPTIMIZED_RESOURCE_SHRINKING_BY_DEFAULT flag - default enabling in trunk staging will be done in a follow up cl

To disable optimized resource shrinking on an app basis one can opt out with
  optimized_shrink_resources: false
bug please file a bug for us to find out why (so that we can remove legacy mode)

Bug: 325905703
Test: Existing
Change-Id: Idb57b8e6bba26f06c044657492ff4ae89ec81254
2024-09-13 09:12:56 +00:00
Justin Yun
2cc42505d9 Soong system image may update the $PRODUCT_OUT
A target must define "USE_SOONG_DEFINED_SYSTEM_IMAGE := true" and
"PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE := <name of soong system image>"
to use the soong defined system image.
The system image must install the files to $PRODUCT_OUT for adb sync
and build verification. Instead of using 'update_product_out'
property in Android.bp, copy the files only if the name of the image
matches with PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE.

Bug: 350599535
Bug: 365700376
Test: lunch aosp_x86_64-trunk_staging-userdebug && m &&
      m aosp_cf_system_x86_64
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-userdebug
      && m
      and adb sync on the cf device
Change-Id: If8673ba2855a753a5559a588bd83068d950fd7e4
2024-09-11 14:34:44 +09:00
Cole Faust
dd46300414 Merge "Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES" into main 2024-09-10 19:33:04 +00:00
Cole Faust
4ce4f8893e Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES
It's been available for over a year, lets progress the python3 migration
by removing it.

Bug: 203436762
Test: Presubmits
Change-Id: I46a6477ec65e98b7e6df5cc1359f676dcbd0f08e
2024-09-09 18:08:49 -07:00
Xin Li
aa8ceca851 Merge "Merge 24Q3 to AOSP main" into main 2024-09-07 01:12:30 +00:00
Colin Cross
399ff4019d Merge "Use transitive header jars in classpaths" into main 2024-09-06 16:19:41 +00:00
Treehugger Robot
4301e29a02 Merge "Revert "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for..."" into main 2024-09-06 00:48:26 +00:00
Bill Yang
3b3aac0088 Revert "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for..."
Revert submission 3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW

Reason for revert: The root cause of the break is already be merged. Related changes: ag/29139095, ag/29139608

Reverted changes: /q/submissionid:3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW

Change-Id: Ie23bdd343bebbd077553dc25f0bfd13539daf57a
2024-09-05 09:22:10 +00:00
Yi Kong
c36f81ee41 Merge "Remove workaround for coverage boot failure" into main am: acde746439
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3239200

Change-Id: I78687e68c6fe24517c033bdda37035d1f3a160d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 07:11:05 +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
Yi Kong
0111a27449 Remove workaround for coverage boot failure
Bug: 269981180
Change-Id: I81399836b588b7a579174b1b6700341d7108d49e
2024-09-02 07:32:41 +00:00
Inseob Kim
bb6ebb056b Merge "Include TARGET_ODM_PROP to odm/etc/build.prop" into main am: 09557a0aa3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237749

Change-Id: Ic2eb7fac04e50bb4dfd98cd2757e3d15a5e83090
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 00:20:56 +00:00
Inseob Kim
09557a0aa3 Merge "Include TARGET_ODM_PROP to odm/etc/build.prop" into main 2024-08-28 00:15:14 +00:00
Pindar Yang
33d6f763e2 Merge "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"" into main am: 1282d27291
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3235655

Change-Id: Idac5d2bbdecd6af39d5983b91bd60a7134e81c9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 03:33:33 +00:00
Pindar Yang
1282d27291 Merge "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"" into main 2024-08-27 03:25:23 +00:00
Pindar Yang
1558cc68ec Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"
Revert submission 3195743-compatibility_matrix

Reason for revert: Build Break, Bug: 361227456

Reverted changes: /q/submissionid:3195743-compatibility_matrix

Change-Id: Ib89cdc64eb816ca0df872473b1e9a9dfdb08ceee
2024-08-27 03:22:41 +00:00
Inseob Kim
9a22c7e61b Include TARGET_ODM_PROP to odm/etc/build.prop
It's missing in Soong's build_prop module.

Bug: 322090587
Bug: 361623560
Test: set TARGET_ODM_PROP and see odm/etc/build.prop
Change-Id: I447a64998f6ae0ba80201ab4ab6c0fd0ef22e3e5
2024-08-26 15:58:09 +09:00
Qing Shen
3c5afb956e Merge "Revert "Revert "Add a coverage suffix to avoid Ninja file regene..."" into main am: ffb985e9bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3238687

Change-Id: I49fbf7ac4214e4f811aad2510f3a57328d8c6c17
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-23 23:25:13 +00:00
Qing Shen
713c54289c Revert "Revert "Add a coverage suffix to avoid Ninja file regene..."
Revert submission 3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD

Reason for revert: Rolling forward with a fix

Adding a coverage suffix for product_config.go too:

FAILED: ninja: 'out/soong/soong.sdv_core_cf.extra.variables', needed by 'out/soong/.intermediates/build/soong/product_config/product_config.json', missing and no known rule to make it
03:42:23 ninja failed with: exit status 1

Reverted changes: /q/submissionid:3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD

Change-Id: I74d0e3fda09b1367f3dbb939d4f47c4d09b3d51f
2024-08-23 21:41:52 +00:00
Treehugger Robot
135b15001c Merge "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong" into main am: 4483c0e7c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3195824

Change-Id: I64fe62dab270f41bd24f38dd36460b9b381e9448
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-15 09:35:44 +00:00
Treehugger Robot
4483c0e7c0 Merge "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong" into main 2024-08-15 09:07:38 +00:00
Treehugger Robot
5c9c275d6e Merge "Build product/odm build.prop with Soong" into main am: 6f4d57a790
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3213179

Change-Id: I4f480134015a513ea5378a8a5bf92e440d33f41c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-12 00:36:42 +00:00
Inseob Kim
01d4f8b823 Build product/odm build.prop with Soong
Bug: 322090587
Test: compare build.prop before and after, boot
Change-Id: I7a7dc785030a0c17e5c09b7f65c978fe9bbcb7a7
2024-08-08 18:13:08 +09:00
Treehugger Robot
d658fea164 Merge "Remove the hardcoded list of api libraries" into main am: d6358b6a9b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3208811

Change-Id: If6b4054ae155e67d66b2ff7fd71b6b364961e750
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-07 00:00:03 +00:00
Jihoon Kang
463893917c Remove the hardcoded list of api libraries
The list no longer need to be maintained given that `java_sdk_library` modules generate from-text stubs by default.

Change-Id: I18c94731d0a337c8815fd589868377fc8933437c
Test: m nothing
Bug: 276958307
2024-08-06 22:39:16 +00:00
Treehugger Robot
5d2439b3b1 Merge "Revert "Revert "Enable from-text stub generation in non-sdk java..."" into main am: 4f18cfdd7d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3205865

Change-Id: I7815c3207e9d41df6e581be31ce3ec1948f7cdba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 19:06:28 +00:00
Treehugger Robot
4f18cfdd7d Merge "Revert "Revert "Enable from-text stub generation in non-sdk java..."" into main 2024-08-06 18:50:04 +00:00
Treehugger Robot
59f0d23ff6 Merge "Add system_ext support to build_prop module" into main am: 32b8daff1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3204632

Change-Id: I1f401c480670cd8ddacd351fc5ea5fb8f01fc6a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:15:58 +00:00
Treehugger Robot
fc413ce622 Merge "Hide unflagged mainline prebuilts with missing source." into main am: 9b10ca4711
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3203370

Change-Id: Idbd05e89c743e0b669092a0f77a1d70ebdfb350e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:15:41 +00:00
Jihoon Kang
ad5e953a7d Merge "Revert "Enable from-text stub generation in non-sdk java_sdk_library"" into main am: f6d9965cc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3207397

Change-Id: I46b1257ff9b15143ebed6c3a3e36db5d2617acf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:14:59 +00:00
Treehugger Robot
696cea31d3 Merge "Enable from-text stub generation in non-sdk java_sdk_library" into main am: 99417ba9ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2983176

Change-Id: I01a3955f2c44dddff31a0b61bf18af34d243856e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 10:09:34 +00:00
Treehugger Robot
32b8daff1d Merge "Add system_ext support to build_prop module" into main 2024-08-06 02:00:28 +00:00
Jihoon Kang
b0f4c0239d Revert "Revert "Enable from-text stub generation in non-sdk java..."
Revert submission 3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI

Reason for revert: Post submit build breakage culprit fixed

Reverted changes: /q/submissionid:3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI

Change-Id: Ic79b7fd074f02febba94183cb1479874efe044b5
2024-08-06 00:15:25 +00:00
Treehugger Robot
9b10ca4711 Merge "Hide unflagged mainline prebuilts with missing source." into main 2024-08-05 23:10:53 +00:00
Jihoon Kang
f6d9965cc5 Merge "Revert "Enable from-text stub generation in non-sdk java_sdk_library"" into main 2024-08-05 20:51:31 +00:00
Liana Kazanova
a574cd28a8 Revert "Enable from-text stub generation in non-sdk java_sdk_library"
Revert submission 2982300-java_api_library_non_sdk

Reason for revert: DroidMonitor: Potential culprit for b/357648959 - 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:2982300-java_api_library_non_sdk

Change-Id: I5ef7afd9ec3e10ea99f82d02172843ad9b2cfda9
2024-08-05 19:45:03 +00:00
Spandan Das
85bd4625ed Hide unflagged mainline prebuilts with missing source.
Partner worksapces contain two versions of mainline prebuilts - BigAndroid
and Go. These two prebuilts export dexpreopt'd system server artifacts
to be installed in system image. Since the install paths are same, we
run into duplicate installation rules issue unless one of them is
hidden.

This hiding was previously done by creating a dependendency between
source aosp apex to BA and Go google prebuilts. However, this
implementaion had the unfortunate side effect on the packaging name of
the Google mainline prebuilts - the name becomes the aosp apex name.

Instead of creating the dependency to aosp apex, this CL hides all
mainline apex_set(s) if it has not been flagged using
RELEASE_APEX_CONTRIBUTIONS_*. Since there are some non mainline apex
prebuilts, apex_name will be used to determine whether the prebuilt is a
mainline module.

Test: m nothing --no-skip-soong-tests
Test: In partner workspaces, downloaded the CLs in b/355682304#comment7
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp apexes are not installed, but mainline prebuilts are
installed

Test: unset RELEASE_APEX_CONTRIBUTIONS_ADSERVICES to build from source
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp adservices is installed, and adservices prebuilt is
**not* installed.

Bug: 355682304
Change-Id: Idacb65313553bdea5c0593976694de478034229e
2024-08-05 18:25:37 +00:00
Treehugger Robot
99417ba9ea Merge "Enable from-text stub generation in non-sdk java_sdk_library" into main 2024-08-05 18:25:36 +00:00
Inseob Kim
acf9174120 Add system_ext support to build_prop module
As some partitions have build.prop under etc/, this change adds
relative_install_path property to build_prop module. Also this change
adds system_ext related Soong variables and system_ext support in
gen_build_prop.py.

Bug: 322090587
Test: build and compare system_ext/etc/build.prop
Change-Id: I416662b8bae09383af0cdd3d8444a5c300006b7b
2024-08-05 12:51:05 +09:00
yangbill
66e555c8c7 Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong
For building framework_compatibility_matrix.device.xml it will use
matrix file path from DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE, and
for product_compatibility_matrix.xml it will use matrix file path from
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE.
This CL import those value from make to soong and will be used in
hardware/interfaces/compatibility_matrices/.

Also add vintf.vintfCompatibilityMatrixRule to the white list for using
custom make rule.

Bug: 352234038
Bug: 344445679
Test: m product_compatibility_matrix.xml
Change-Id: Ib7042ee2d771bd47a12f0565014b4006da678ddb
2024-08-02 08:38:41 +00:00
Inseob Kim
db166effa0 Revert^2 "Conditionally pass kernel version to build.prop" am: 6bd92d5924
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3199371

Change-Id: I47dd45bd74c11e604b17ee195f95a6e2575a23b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 00:05:16 +00:00
Inseob Kim
6fb79d21f5 Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop" am: d8538e5db0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3201030

Change-Id: Ic6b0119e38b0c7e7592735289553e8e60e3c86ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 00:05:13 +00:00
Inseob Kim
6bd92d5924 Revert^2 "Conditionally pass kernel version to build.prop"
This reverts commit 29fed1efe8.

Reason for revert: Fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I207abd188636673250eb9a070be95db0b82f39e7
2024-07-31 02:17:49 +00:00
Inseob Kim
d8538e5db0 Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
530c32acbe

Change-Id: I9dc817855e3db7b96320a977b24b84d72e762893
2024-07-31 02:17:39 +00:00
Liana Kazanova
329f004d5f Revert^5 "Add TARGET_SYSTEM_PROP to system build.prop" am: 530c32acbe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3200273

Change-Id: I0c5a05a15eb9a16b5dddeff28ea11da211f787cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 23:51:09 +00:00
Liana Kazanova
530c32acbe Revert^5 "Add TARGET_SYSTEM_PROP to system build.prop"
26756a86c1

Change-Id: Iad186b283ea78477c33bfc4519b9a27395557b55
2024-07-31 08:26:38 +09:00
Liana Kazanova
6a64398e2f Merge "Revert "Conditionally pass kernel version to build.prop"" into main am: 2426d49060
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3199691

Change-Id: If8341d7a6a57d1e98116f899735dd37c794bf0b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-30 23:09:24 +00:00
Liana Kazanova
2426d49060 Merge "Revert "Conditionally pass kernel version to build.prop"" into main 2024-07-30 22:53:16 +00:00
Jihoon Kang
062eb663c5 Enable from-text stub generation in non-sdk java_sdk_library
This change allows from-text stubs to be generated for all
java_sdk_library modules, unlike how it is currently limited to the
modules that contribute to the api surfaces (i.e. the SDK).

This change accomplish this by modifying the dependency of the
from-text stubs generation, so that the sdk_library generated from-text
stubs generating java_api_library modules no longer depend on the full
api surface stubs, but generate the stubs in the module level, and
combined later to generate the full api surface stubs.

This change also removes the java_api_library modules defined in
core-libraries/Android.bp, which are passed to generate the system
modules. Given that the from-text vs from-source toggle is done within
the java_sdk_library stubs level, these modules no longer need to exist.

Implementation details:
- Allow sdk_version to be specified in java_api_library modules. For
  java_sdk_library-generated java_api_library modules, they inherit that
  of the sdk_library module. Some java_sdk_library modules that do not
  contribute to the api surface are allowed to set sdk_version to
  something other than "none" or "core".
- Implement java_api_library to implement `SdkContext`. This allows
  java_api_library to collect required deps from sdk_version (classpath,
  bootclasspath, system modules), and pass the collected jars when
  generating the stubs srcjar in metalava and compiling the stubs srcjar
  in javac.
- Remove hardcoded list of sdk_library modules that are allowed to
  genereate stubs from the api signature files, and allow from-text
  stubs generation by default. Modules that are not able to generate
  stubs from the api signature files are specified by setting the newly
  introduced `Build_from_text_stubs` property to `false`.

Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 327507877
Change-Id: Ia35d2f3cf9fae48fc8c4bd99a84ae18d7c0e7bee
2024-07-30 22:35:06 +00:00
Liana Kazanova
29fed1efe8 Revert "Conditionally pass kernel version to build.prop"
This reverts commit 036d9e6744.

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

Change-Id: I58f1e43978eb812004d2e46fa7ce402e164d2800
2024-07-30 17:58:19 +00:00