commit | 9780e330b30d6f566d3f48cac9c47a5c6869da15 | [log] [tgz] |
---|---|---|
author | Jared Duke <jdduke@google.com> | Mon Jun 13 09:32:49 2022 -0700 |
committer | Jared Duke <jdduke@google.com> | Wed Aug 03 13:17:17 2022 -0700 |
tree | 6bee6a5eb7b7b3c7faf67358b950b77b36a46a87 | |
parent | 79697db9eef3a672455aa2ca612191cf3791f574 [diff] |
Enable R8 code shrinking for system_server by default Flip the setting that controls R8 shrinking for system_server from opt-in to opt-out. This can be controlled by vendor makefiles and from the command-line using the `SYSTEM_OPTIMIZE_JAVA` boolean build flag. Note that this change only enables code shrinking for system_server, and should not impact stack traces except for certain stack frames involving synthetics. Additional (vendor) code that is loaded dynamically into system_server, that references system_server code, should use system_server APIs that are expicitly annotated with `@android.annotation.SystemApi`. Additional (vendor) code added directly to services.jar, which doesn't fall into existing keep patterns in the services proguard.flags configuration and would otherwise be stripped, should be annotated with `@com.android.internal.annotations.Keep`. Results: services.jar (20MB -> 17MB) Bug: 210510433 Test: atest CtsInstalledLoadingProgressHostTests CtsAutoFillServiceTestCases CtsAppSecurityHostTestCases CtsAppTestCases Change-Id: Icc77c9451d9a4a83e02cb591693354988f8d0ec4 Merged-In: Icc77c9451d9a4a83e02cb591693354988f8d0ec4
This is the Makefile-based portion of the Android Build System.
For documentation on how to run a build, see Usage.txt
For a list of behavioral changes useful for Android.mk writers see Changes.md
For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.
This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.