Commit Graph

30114 Commits

Author SHA1 Message Date
Bob Badour
398bd87950 Revert "Revert "Revert "Create lists of projects to share per dist target"""
This reverts commit 82040d9882.

Reason for revert: Advised to switch to using TARGET_BUILD_APPS

Change-Id: If56a1fceb5da66b90b7b0ec2275ec429661515b4
2022-06-14 00:03:23 +00:00
Treehugger Robot
68975ad0fd Merge "Revert "Record license text for every dist target."" 2022-06-13 23:47:32 +00:00
Treehugger Robot
1818a57e87 Merge "Revert "Dexpreopt: prepare to merge class loader context from al..."" 2022-06-13 22:21:40 +00:00
Bob Badour
1e27f4fff9 Revert "Record license text for every dist target."
This reverts commit 5c0ec6a5a6.

Reason for revert: Advised to switch to using TARGET_BUILD_APPS

Change-Id: I1442998bbafe909a0796abdb2e9691a0c4c099d6
2022-06-13 19:38:01 +00:00
Ulya Trofimovich
8b9f334eed Revert "Dexpreopt: prepare to merge class loader context from al..."
Reason for revert: performance regression on AppStartup.
Reverted Changes:
I6522319a8:Dexpreopt: prepare to merge class loader context f...
Ic8528dffd:manifest_check.py: add uses-libraries propagaged v...

Bug: 235304939
Bug: 214255490
Change-Id: Iff6ad6f0d862df259bf9e3dd7017c268dbcbf8bf
2022-06-13 09:06:59 +00:00
Yi-yo Chiang
109f63823b Merge "Add ro.force.debuggable=0 to ADDITIONAL_SYSTEM_PROPERTIES" 2022-06-13 06:17:47 +00:00
Treehugger Robot
aa3bc3be79 Merge "Add wifi_module/source_build Soong config variable" 2022-06-10 18:46:17 +00:00
Treehugger Robot
f0bb8291c8 Merge "Record license text for every dist target." 2022-06-10 18:09:41 +00:00
Treehugger Robot
e25ddc0453 Merge "Revert "Revert "Create lists of projects to share per dist target""" 2022-06-10 18:09:03 +00:00
Paul Duffin
4f4b6d776d Add wifi_module/source_build Soong config variable
As an optional module, wifi has its own Soong config variable. This
change ensures that it is controlled by the same environment variable
as the rest of the modules.

Bug: 233965247
Test: # Unpack wifi snapshot that uses wifi specific Soong config.
      m nothing
      # Without this the build fails as it uses the wifi prebuilts
      # which do not work in AOSP.
      # With this change the build passes as it uses the wifi
      # sources.
Change-Id: Iea0ad09182a162b8f5ddf1403f65a3bbffb9ef08
2022-06-10 11:26:16 +00:00
Yi-Yo Chiang
70b69de18a Add ro.force.debuggable=0 to ADDITIONAL_SYSTEM_PROPERTIES
This should only be set to '1' by flashing debug boot image,
so default to '0' in system/build.prop.

Bug: 223517900
Test: Boot with and without debug boot image and check value of property
Change-Id: I0e0df7d86a31fd771248433513483e8ad600b5ed
2022-06-10 15:28:31 +08:00
Treehugger Robot
7e91201269 Merge "Obsolete BOARD_PLAT_*_SEPOLICY_DIR" 2022-06-10 01:56:16 +00:00
Dan Willemsen
b34c387441 Obsolete BOARD_PLAT_*_SEPOLICY_DIR
These were marked as deprecated in late 2020 [1]. Shortly later, there
was an attempt to obsolete them [2] for products shipping with API level
31 or greater, but that was reverted [3] because of internal users.

1: I58c64839cc513ae082cd3ee3c1e108843ea7439e
2: Ic4d1164be611836f6aa697fbf1cb1f1c73a3cd39
3: I7d3556aa0f06684b43f80f09e4c8194c6c44336c

Since these are causing warnings on every build, and there are no more
internal users, just obsolete them entirely. We don't need to rely on
the product shipping api level, since that does not guarantee
source-level compatibility -- and this is an easy fix even if people
have been ignoring the real warnings.

Bug: 235414673
Test: treehugger
Change-Id: If803a33efc38a970247919bf224c12b8c717f955
2022-06-09 09:36:52 -07:00
Treehugger Robot
294aeed6d5 Merge "Fix license package name and provide license text." 2022-06-09 10:25:34 +00:00
Bob Badour
5c0ec6a5a6 Record license text for every dist target.
Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105

Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_coral_hwasan TARGET_BUILD_VARIANT=userdebug droid dist with-license platform_tests continuous_instrumentation_tests continuous_native_tests

Change-Id: Ibd737c0dd0a35e19529ab08472f4d1bc1195efbd
2022-06-08 18:49:37 -07:00
Bob Badour
82040d9882 Revert "Revert "Create lists of projects to share per dist target""
This reverts commit 59e4951021.

Reason for revert: Attempt to roll forward again.

Test: m droid dist reportmissinglicenses

Change-Id: Ibf5a9869d03726e279fb23bf68ca66547b972138
2022-06-08 18:49:20 -07:00
Bob Badour
8ef100aee9 Fix license package name and provide license text.
Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_coral_hwasan TARGET_BUILD_VARIANT=userdebug droid dist with-license platform_tests continuous_instrumentation_tests continuous_native_tests

Change-Id: Ic450732083773668bf9d9d0e1fffa1852f88ab45
2022-06-08 18:28:04 -07:00
Bob Badour
fc26ac07a4 Fix recovery_unit_test
Return to using zip instead of SOONG_ZIP

Bug: 235405168

Test: m droid dist
Change-Id: I6f0f2fa7861bca18e34576c920a3c33ffef6b46e
2022-06-08 17:03:02 -07:00
Treehugger Robot
5c6b4e029b Merge "Fix pitfall: do not delete intermediates dir." 2022-06-07 22:28:40 +00:00
Bob Badour
eb9431ee8a Fix pitfall: do not delete intermediates dir.
Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_coral_hwasan TARGET_BUILD_VARIANT=userdebug droid dist with-license platform_tests continuous_instrumentation_tests continuous_native_tests

Change-Id: Ibf1bff6ee67e4958b1e1ea2fbc0385787d3bf0f0
2022-06-07 10:02:12 -07:00
Bowgo Tsai
c85a201d5e Using BOARD_AVB_VBMETA_VENDOR_IMAGE_ARGS for vbmeta_vendor.img
The value of BOARD_AVB_VBMETA_SYSTEM_IMAGE_ARGS and
BOARD_AVB_VBMETA_VENDOR_IMAGE_ARGS are usually the same, e.g.,
--padding_size 4096 --rollback_index 1656979200.

However, in a split build, the value of
BOARD_AVB_VBMETA_SYSTEM_IMAGE_ARGS might be empty.
Using BOARD_AVB_VBMETA_VENDOR_IMAGE_ARGS to correctly
assign the value for vbmeta_vendor.img.

Bug: 232360330
Test: TreeHugger
Change-Id: Ia26816bd309084c3a4c0df6b9f2f3fc5a28bc31a
2022-06-07 11:36:35 +08:00
Ulya Trofimovich
3eff61ca8a Merge "Dexpreopt: prepare to merge class loader context from all deps." 2022-06-06 12:50:34 +00:00
Treehugger Robot
1f0c3583a6 Merge "Create license metadata for copied targets." 2022-06-03 02:05:02 +00:00
Bob Badour
ba3372439f Create license metadata for copied targets.
Bug: 213388645

Test: m cts dist reportmissinglicenses
Change-Id: I43043e5e7b80d9f3210d6498c215846aec761add
2022-06-02 15:43:08 -07:00
Jooyung Han
8c0ece3599 Add same_vndk_variants.timestamp to checkbuild
Before aosp/1851043, it was triggered by checkbuild because the
timestamp is attached to $LOCAL_BUILT_MODULE. With aosp/1851043, the
timestamp is not triggered by checkbuild and when a new VNDK lib is
added the check might get skipped in AOSP tree while it can break in the
downstream trees when actually used.

This change adds the same_vndk_variants.timestamp files to checkbuild
again so that CI catches the errors.

Bug: 233616647
Test: prebuilts/build-tools/linux-x86/bin/ninja -f \
  out/combined-aosp_cf_x86_64_phone.ninja -t query checkbuild \
  | grep same_vndk_variants.timestamp

Change-Id: I26043ec001ca2473fccfc19368d035374c663a21
2022-06-02 11:38:12 +09:00
Junfeng Wu
6ecd7d177a Use OUT_DIR to find the r8/d8 binaries instead out hard coded out/
Test: USE_RBE=true m
Bug: 233046271

Change-Id: I71d71a3560a97a2173bf415fe8a584ea0c0a5942
2022-05-25 06:29:46 +00:00
Ulya Trafimovich
51ad6b81a8 Dexpreopt: prepare to merge class loader context from all deps.
The makefile implementation of dexpreopt is lagging behind the Soong
implementation in the way it handles transitive dependencies: Soong
propagates class loader context through transitive dependencies, such
as static libraries, but makefiles only propagate that information
through uses-library dependencies.

This discrepancy is caused by the difficulty of handling class loader
contexts in makefies: since there is no topological order in handling
module and its dependencies, the information is propagated via file
level dependencies on dexpreopt.configs and merged into the module's
dexpreopt.config with a python script.

To handle transitive dependencies correctly, it is necessary to
generate dexpreopt.config files for all libraries, not just those that
enable dexpreopt.

This change only prepares dex_preopt_odex_install.mk for that and
updates if for corresponding changes in manifest_check.py. It does not
enable generation of dexpreopt.config files for non uses-library
dependencies (e.g. static libraries). This will be done as a follow-up.

Changes:

  - renamed option for dependency dexpreopt.config files
  - added option for self dexpreopt.config
  - moved variable definitions so that they can be used both by
    uses-library check and dexpreopt command
  - add 'Optional' field in makefile-generated dexpreopt.config to
    align it on par with Soong-generated configs
  - modify dex_preopt_config_merger.py to add uses-libraries propagated
    via dexpreopt.config files

Bug: 214255490
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
    && adb wait-for-device && adb root \
    && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
    # a few unrelated errors caused by missing optional uses-libraries
    #   android.net.ipsec.ike
    #   androidx.window.extensions
    #   androidx.window.sidecar
    # that were present before this patch
Change-Id: I6522319a8415f22f90fc96059a34675fb830e5cc
2022-05-24 16:02:49 +01:00
Treehugger Robot
a3dc792131 Merge "Add a doc about dex_preopt_check." 2022-05-23 10:25:43 +00:00
Jiakai Zhang
500671f61c Add a doc about dex_preopt_check.
The doc lists some possible causes of a `dex_preopt_check` error, which
can be useful for developers to understand how to debug the error.

Bug: 232542678
Test: m nothing
Change-Id: I2e9868a6a470e41e8c3743c045e0cf4cf7367efa
2022-05-20 16:21:46 +01:00
Yi Kong
05b2217940 Merge "Rename modulesAddedWall to modulesWarningsAllowed" 2022-05-20 00:26:18 +00:00
Yi Kong
ee99ddf900 Rename modulesAddedWall to modulesWarningsAllowed
MODULES_ADDED_WALL is deceiving and it actually meant which modules are
allowed to have warnings (do not automatically append -Werror flag).

Test: presubmit
Bug: 233183337
Change-Id: Ia2eb972d3d76ba245840f9872cbcc66d2894dab3
2022-05-19 20:16:00 +08:00
Dmitrii Merkurev
8ab6603a43 Introduce EROFS compress hints to the Android build system
Make it possible to provide a prebuilt hints file to specify different compression strategies on a file basis for all partitions using:

BOARD_EROFS_COMPRESS_HINTS := <path>/erofs-hints.txt

or separately for every partition using:

BOARD_SYSTEMIMAGE_EROFS_COMPRESS_HINTS := <path>/system-partition-erofs-hints.txt
BOARD_VENDORIMAGE_EROFS_COMPRESS_HINTS := <path>/vendor-partition-erofs-hints.txt

Hints format: Each line is defined by tokens separated by spaces in the following form:

<pcluster-in-bytes> <match-pattern>

pcluster-in-bytes can be specified as 0 which mean file will not be compressed

Bug: 231934752
Test: used dump.erofs -S system.img to verify the system image isn't compressed after specifying BOARD_SYSTEMIMAGE_EROFS_COMPRESS_HINTS := no-compress.txt, where no-compress.txt contains 0 .*
Test: used dump.erofs --nid=<inode-for-all-apk-files> vendor.img to verify apk files are not compressed (the rest of the partition content is compressed)
Test: used dump.erofs -S <all-images> to verify all images are not compressed after specifying BOARD_EROFS_COMPRESS_HINTS := <path>/no-compress.txt
Change-Id: I64054e26af5ea5781c45d2183b7796a9ad2b7927
2022-05-17 23:10:37 +00:00
Treehugger Robot
d528b3c553 Merge "Create $(zip_root)/PVMFW & archive prebuilt used" 2022-05-17 16:34:22 +00:00
Treehugger Robot
3eb3ca0c9b Merge "Add keep rules for @KeepForWeakReference annotation" 2022-05-16 21:19:03 +00:00
Treehugger Robot
266225ccb2 Merge "Revert "Do not compress zip file for unit tests."" 2022-05-13 23:44:57 +00:00
Sam Saccone
7d7ae94bef Revert "Do not compress zip file for unit tests."
This reverts commit a24c755f66.

Reason for revert: not worth the additional storage cost.

Change-Id: I8ed24ddef4ac3f640bf35e79cddf433e0df0854d
2022-05-13 19:55:25 +00:00
Anton Hansson
59f95bcd1c Merge "Remove unused dependencies from sdk goals" 2022-05-13 08:55:55 +00:00
Colin Cross
544aedda27 Merge "Remove HOST_DALVIK_*" 2022-05-12 15:44:20 +00:00
Pierre-Clément Tosi
c7b837872d Create $(zip_root)/PVMFW & archive prebuilt used
It might be useful to have access to the prebuilt that the Android build
used to create the pvmfw partition so add a new directory (similarly to
other partitions) containing the prebuilt (which is also the only
content of the partition). This is particularly useful in ATC, when
detecting if the prebuilt was updated by the build.

Bug: 232253742
Test: m
Change-Id: I1116d91ffb073821568bcaeed30bbb43873dcafa
2022-05-12 16:37:46 +01:00
Anton Hansson
55a8f02ea8 Remove unused dependencies from sdk goals
The SDK no longer includes system images, so no longer needs to depend
on targets that are only relevant for the system images.

Remove all the explicit dependencies that end up depending on
"everything" but are not included in the sdk zip.

Two positive side-effects:
- fewer unused things get built (now ~32k targets, down from ~108k)
- apexes no longer get built, eliminating the risk of mismatch between
  module sdk prebuilts and source-built AOSP apexes.

There are some potential risks with this CL:
- because we no longer forcefully rebuild everything, if there are bugs
  in dependencies of exising files in the SDK, incremental builds may
  not rebuild them.
- some files that get built into the SDK may be being built as a
  side-effect of other files included in the SDK, so removing one file
  may cause another to not get built. The solution to that is to add
  the file not getting built to ALL_SDK_FILES.

Bug: 205008975
Test: m sdk sdk_repo dist && diff sdk.zip before/after (identical)
Change-Id: I97284864f66aa88556fbe16864f45b04be97634e
2022-05-12 12:28:49 +00:00
Jared Duke
7d0c90b51f Add keep rules for @KeepForWeakReference annotation
Ensure annotated fields are kept when treeshaking-related optimizations
are enabled. Note that this still allows field removal if tree shaking
reveals no references, but will avoid removal if there are references
that might impact downstream usage, e.g., weak references.

Bug: 227455445
Test: atest InternalAnnotationsTest
Change-Id: I59c6277c43b14c5de8154fa1eefad01f0702e413
2022-05-11 09:47:12 -07:00
Colin Cross
a9203e6d87 Remove HOST_DALVIK_*
There are no more BUILD_HOST_DALVIK_* modules, remove the host dalvik
support.  The equivalent support in Soong just copies the device dex
file to the host dalvik location.

Test: m checkbuild
Change-Id: I4bcf916518317b28d3217994b2fe9ee95d7f50d6
2022-05-11 08:17:45 -07:00
Cole Faust
4edc0b30ff Remove all_product_makefiles
It was unused, along with all_product_configs.

Bug: 228518445
Test: Presubmits
Change-Id: Ibd105241581f8b03254b8fee382d916ea3a98890
2022-05-10 15:39:10 -07:00
Cole Faust
6f6060a358 Add function for flattening 2d lists
Bug: 226974242
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: Iae977b34ca0ac156ec795c54f4951c769fa994dd
2022-05-05 11:41:59 -07:00
Ulya Trofimovich
de1949b562 Merge "Extend hardcoded list of optional uses-libraries." 2022-05-05 12:57:54 +00:00
Xin Li
c01930f7d7 Merge "Merge SP2A.220505.002" 2022-05-04 20:30:21 +00:00
Treehugger Robot
5161627644 Merge "fixup! Embed host liblz4.so in target_files" 2022-05-04 17:23:40 +00:00
Ulya Trafimovich
0932a821c0 Extend hardcoded list of optional uses-libraries.
This is a temporary workaround that should be replaced with build logic
that would propagate optionality via generated exported-sdk-libs files.

Bug: 214255490
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
    && adb wait-for-device && adb root \
    && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
    # empty output, no errors at boot
Change-Id: I05e22e5f72a9f936b6e0010240f5e71849a9b2b0
2022-05-04 13:36:47 +01:00
Xin Li
a08bbcebb4 Merge SP2A.220505.002
Bug: 231319788
Merged-In: I5a35451e14cba5f115ab66926d62c4fa4556a267
Change-Id: Iebd16f49429a66da431c4277c60de7030b55b7a5
2022-05-03 20:54:36 +00:00
Treehugger Robot
7d2d41ce2e Merge "Remove RBC_BOARD_CONFIG" 2022-05-03 17:22:56 +00:00