Before, as each module was built, it would dump its proguard-related
files into the PACKAGING folder. Then the rule for the final distable
zip would zip up this whole folder. This means that if you built a
module that was not part of the system, and then rebuilt the final
zip, it would erronously include more proguard files than necessary.
This problem was worked around by relying on CI to run `m installclean`
every time.
Now, the zip proguard files always include the same information.
This also makes it so that when you build a module, its proguard files
are not copied to the PACKAGING folder, making builds that don't
build the final proguard zips slightly faster.
Bug: 205632228
Test: diff'd proguard-dict.zip, proguard-dict-mapping.textproto, and proguard-usage.zip before/after this cl on sdk_phone_x86_64. They have diffs, but only in the order of files / lines.
Change-Id: I98c02e1eb117c337ba9b98f04ad486597eb9bb86
Previously, the "sdk" target was a minimal lunch target that only
included enough to build the sdk. But the "sdk_<arch>" targets
redirected to the "sdk_phone_<arch>" targets, which are much bigger
and capable of building a whole emulator.
Building the sdk on products that can build a whole device complicates
the rest of the build system (for example, it starts enforcing dexpropt
works)
Bug: 290798660
Test: m sdk dist sdk_repo device-tests platform_tests on sdk_x86_64-userdebug
Change-Id: I76f38cf19172a5f5fae423175d5e03670137a0df
Automatic RROs don't make sense for tests, the tests can't rely on
overlays being installed on product or vendor. Creating the RROs
causes a race during builds that build both droid and device-tests
goals, as the RROs may be installed to the vendor directory as a
dependency of the device-tests goal before or after the vendor image
is packaged as a dependency of the droid goal. If the RROs are
installed first and the vendor image is low on space it may result
in an out-of-space error.
Bug: 282885159
Test: Rule to build $OUT/vendor/overlay/SystemUITests__*__auto_generated_rro_vendor.apk no longer exists
Change-Id: I760355ffb1818e91c02a98473312f9f21c149361
Merged-In: I760355ffb1818e91c02a98473312f9f21c149361
Original aosp/2374663 was reverted, so this change cnotains the implementation but disabled by default and SBOM will not be built by default with "m dist".
The feature will be enabled later in small CLs after running tests successfully in forrest.
Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: I926d0f97f3a0330ef61d059f12ea660005d370e6
Original aosp/2374663 was reverted, try to submit it again with some fixes in this.
Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: Icf305770473f0c448a1ad721cbe7addf737115e4
Context
- Currently, unembedded JNI libraries are being installed from a symlink based on an android_app's partition.
- Unembedded JNI library may exist in a different partition from that of the app module, thus create a symlink based on the partition of each jni libraries.
- Scope of this change is limited to bp modules, and does not affect mk modules.
Implementation
- Use the JNI library name:partition mapping from LOCAL_SOONG_JNI_LIBS_PARTITION_<target> to create a symlink.
Bug: 154162945
Test: m
Change-Id: Ie9396e0eb1c5bfc5855a2a84db395a2b9008b17b
This reverts commit 59ecb9e016.
Reason for revert: symbols_map is fixed to ignore non-elf files
Bug: 218888599
Change-Id: I88654b2dba3dfb9ab2809b0555544277279f345d
Run the symbols_map tool on each unstripped binary and proguard
dictionary while copying it to produce a textproto that maps the
hash to the symbol/dictionary file location. Combine the textprotos
into a mapping file when producing the zipped build artifacts.
Bug: 218888599
Test: m dist
Change-Id: I78997e2f3b631ed74213903cc8e72415b2d7eee0
Some module types include BUILD_NOTICE_FILE a second time after
the include from base_rules.mk. This won't work after a future
change, and doesn't seem to be necessary as none of the files
leave any modified LOCAL* variables in place for notice_files.mk
to read.
Bug: 207445310
Test: m checkbuild
Change-Id: I8c68888d6bf26926f5c2216abe147ccf28ddc2b8
Remove the copy rules for LOCAL_SOONG_BUILT_INSTALLED, they will already
be created by Soong.
Also clean the soong host tools directory to remove any old copies of
java binaries.
Bug: 204136549
Test: m checkbuild
Change-Id: Ib6b5362ad59aa48770e48541430d6857846926c2
Save disk space when building checkbuild by avoiding copying the Soong
output file into the Make intermediates directory.
All the same files in out/soong that were created by m checkbuild before
this patch are still created after this patch. In the internal branch
the total size of the out directory after m checkbuild is reduced from
1320 GB to 965 GB.
Bug: 201816050
Test: m checkbuild
Change-Id: I6370df44f9baab00fcfe30c072600fe58109954d
The normal pattern is:
1. Set a bunch of variables like LOCAL_MODULE
2. Include a makefile specific to the module type
3. The included file in turn includes base_rules.mk
4. At the end of base_rules.mk, it include notice_files.mk
5. The included file declares a build rule and finishes.
The below files included for some module types add additional
dependencies after returning from base_rules.mk, which are not
reflected in the notice files.
Including notice_files.mk a 2nd time adds these dependencies.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Test: m systemlicense
Change-Id: I030399ffb13a2cfb58cf583ae5a2e418f5dbc534
Use an order-only dependency from $(LOCAL_BUILT_MODULE) to the symbols
file so that wiping the symbols directory during installclean doesn't
force anything to rebuild.
Bug: 186507256
Test: m && rm -rf $OUT/symbols && m
Change-Id: Ic164819c71f9db6126ff91c58752c8727cde0d5e
To dexpreopt in post processing, store config files for dexpreopt
Bug: 158843648
Test: m dist and check dexpreopt_config.zip
Change-Id: I5c63a5ffc10023994b14e3a63f50defb9194739f
Package jacoco-report-classes.jar, proguard_usage.zip and
proguard_dictionary out of directories in $OUT/obj/PACKAGING
so that they get cleared by m installclean. This will make
incremental builds that package these files accurate as long
as installclean was run, which is much faster than a full clean
build.
Bug: 184583915
Test: m TARGET_BUILD_APPS=DeskClock EMMA_INSTRUMENT=true dist
Change-Id: I60c6a0fec1fbce26eab8d5adab25a2231b48e251
Merge all the proguard_usage.zip files produced by the R8 rules and
dist the result.
Bug: 151857441
Test: m TARGET_BUILD_APPS=DocumentsUI dist
Change-Id: I7e6d73241478016093a203dc7bd86407ab86a4ac
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.
Test: treehugger
Change-Id: Iea6caf3c08252a560155e095135c5ddaad712991
Merged-In: Iea6caf3c08252a560155e095135c5ddaad712991
Dist the transitive lint report for each unbundled app built by Soong
when lint-check is on the command line.
Bug: 153485543
Test: m TARGET_BUILD_APPS=Gallery2 lint-check dist
Change-Id: Icd2b6f884396fa5f743746099301c325ca82a324
When building an app in Soong with JNI libraries copy the unstripped
libraries to the symbols directory in directory that matches the
installed path of the APK.
Bug: 159726429
Test: forrest
Change-Id: If8e423c7cdf3afd518761b5ab6bc857321acda46
Instead of using `x := $(x) foo`, make sure `x` is initialized first,
then use `x += foo`.
For a aosp-master/aosp_crosshatch-userdebug build, this takes the build
from 49s to 33s (no significant difference in peak memory)
Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: I41fb7611030dd3ba824f896a9c9eadbdd218f464
(This is a cherry-pick change.)
Bug: 153675112
Test: m cts && ls out/host/linux-x86/cts/android-cts/testcases/
Change-Id: I2f24f4567ed3fab1f6ad4d66cc0f798332543b8d
Merged-In: I2f24f4567ed3fab1f6ad4d66cc0f798332543b8d
_apkcerts_write_line has assumed that the stem name of a package is the
same as the module of it. That assumption however breaks for
APK-in-APEX, in which case the stem name is Foo while the module name is
Foo.com.android.bar (where com.android.bar is the name of the APEX where
the APK is in).
Fixing the issue by recording the stem name and use it.
Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generat4ed apkcerts txt file to see that it has
Tethering.apk instead of Tethering.com.android.tethering.apex
Exempt-From-Owner-Approval: cherry-pick from AOSP
Merged-In: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
(cherry picked from commit f58fd52b14)
Change-Id: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.
Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Missing LOCAL_CERTIFICATE produces an apkcerts.txt file that
has no key for the APK, which confuses the signing tools.
Enforce that it is set.
Bug: 147765187
Test: m apkcerts-list
Change-Id: I1299505d193deba5956954e5d9b6e4c727456b9c
android_app and android_test modules were not built as part of
javac-check, which resulted in not running them in the Error Prone
build.
Fixes: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I278d7ee0cdc3f49aa8fa4d4f13309e29d700f2ba
Stripping is incompatible with ART module updatability.
Bug: 65154345
Bug: 138851227
Test: build and observe no change in output (stripping is not used by
default).
Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
AAPT2 is used everywhere now, remove support for AAPT1. Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).
Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.
Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
This change splits the LOCAL_SOONG_RRO_DIRS into two,
representing RRO dirs that originated from device and
product overlay configs, respectively.
Also plumb the device/product configs in separately.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Iddee1b4d7303b7ecaeced91216ea82fe29123770
If LOCAL_EXPORT_PACKAGE_RESOURCES is unset then
append_enforce_rro_sources was inserting a blank entry into
the 4th. When converting the || separator back to space that
resulted in a two sequential spaces, which is treated as a
single word separator, causing the 5th field to be treated
as the 4th field.
Put "false" into the 4th field in soong_app_prebuilt.mk to match
package_internal.mk.
Bug: 123510624
Test: m SystemUIGoogle
Change-Id: I794c413e33df2020d0dc43379cfb017e7e09baa1