This allows to use Metalava to generate metadata files useful for
Android Studio as part of a droidstubs target.
Once those files have been created in a new metadata folder, they are
zipped to make it easier to transfer them into the
out/target/common/obj/PACKAGING folder where they can then be picked up
by the SDK build to be included there.
Bug: 142480924
Test: m sdk
Change-Id: I4be1c9e78369c65ee9cd94706c6d20ab0df6b797
Merged-In: I4be1c9e78369c65ee9cd94706c6d20ab0df6b797
The NOTICE files are missing from prebuilt apexes, and it turns out they
were excluded when building bundles.
Bug: 140317706
Test: Ran build_mainline_modules.sh and checked bundle base modules.
Change-Id: I92c4231f2007e1d8cd9c2bd044201458803c0fd7
When the native coverage is enabled, APEXes (and files there) are built
for native coverage as well.
Bug: 138952487
Test: make -j NATIVE_COVERAGE=true COVERAGE_PATHS='*' com.android.resolv
find out -name "*.gcno" | grep DnsResolver shows files
Test: libnetd_resolv.zip is found under
$(TARGET_OUT)/apex/com.android.resolv/lib directory
Merged-In: I97bcee9bf8ffc0dc71453abbdb613ed56ea2cdb4
(cherry picked from commit ee9a98d88e)
Change-Id: I97bcee9bf8ffc0dc71453abbdb613ed56ea2cdb4
Test: successfully get coverage data from coverage build.
Bug: 137865099
Change-Id: I7df96c2b2c2ec2859393fb2c19ffe1081d112c96
Merged-In: I7df96c2b2c2ec2859393fb2c19ffe1081d112c96
This change fixes a bug that APEX prebuilts are auto-disabled in
platform builds (i.e. non-unbundled builds).
Bug: 137282010
Test: m com.android.conscrypt
check that the apex is from prebuilt directory
Change-Id: I935ef3896e80864bdcc1ca5f6fc12b63c9588c0d
require_root is added to allow auto-generated test config to include
RootTargetPreparer so the test runs with root permission.
Bug: 134509111
Bug: 136633978
Test: add "require_root: true" to init_benchmarks and libpower_test
build the modules, confirm the extra target preparer is added in the
test configs.
Change-Id: Ia07503e338935d6aa92560e7cf7b18d2a4c51243
Merged-In: Ia07503e338935d6aa92560e7cf7b18d2a4c51243
This change fixes two problems:
1) the prebuilt apexes are force disabled for the unbundled builds
because we need to build the modules from the source then
2) the dependencies from an sdk_library module to
*.stubs.{public|system|tests} are not added for the unbundled build
because the stubs modules are disabled.
Bug: 137282010
Test: unbundled mainline builds are successful
Test: build com.android.media and inspect the jar file to see if
hiddenapi flags are there
$ cd out/dist/mainline_modules_arm
$ unzip com.android.media.apex apex_payload.img
$ mkdir -p mnt
$ sudo mount -o ro,loop apex_payload.img mnt
$ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi
shows results
Merged-In: I2c00af07aac4a15770d3acab011a36e2e4803bfc
Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc
This reverts commit 7b8a567f44.
Bug: 137282010
Test: With the CL above this one, the unbundled mainline module build
does not fail.
Merged-In: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17
Change-Id: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17
Some prebuilt APEXes are enabled with scudo, which causes crash on
devices with asan.
Bug: 137216042
Test: build walleye_hwasan and check if apexes are not from prebuilts
Change-Id: Ic436ad06e724af952d99fb8e66358a595450eb84
When the device does not support non-flattened APEX (i.e.
TARGET_FLATTEN_APEX is set to true), then ignore the prebuilt_apex
modules even when `prefer: true`.
Bug: 136251130
Bug: 136662772
Test: build marlin, and check if /system/apex has flattened APEXes
Change-Id: I9f3dfefc3bd357d6750fbb1e418937d095720b04
Mainline builds privileged apps unbundled and then uses them as
prebuilts, so they need to respect the privileged flag when
deciding whether or not to uncompress the dex.
Bug: 135772877
Test: TestUncompressDex
Change-Id: I91da7116b779ae35c0617ef77dbcb9788902370c
Merged-In: I91da7116b779ae35c0617ef77dbcb9788902370c
(cherry picked from commit 53a87f523b)
Instead of outputting an aggregated NOTICE file as an intermediate build
resource to allow Make to include it in the final system-wide NOTICE,
process and embed it as an asset in the final APEX. This allows us to
update the NOTICE contents automatically when an APEX is updated.
Fixes: 135218846
Test: Built mainline modules, apex_test.go
Change-Id: Ic851b330fe93be1f602907d44ecc7886c3b0171b
Merged-In: Ic851b330fe93be1f602907d44ecc7886c3b0171b
(cherry picked from commit 14f5ff62c9)
If embed_notices or ALWAYS_EMBED_NOTICES is set, collect NOTICE files
from all dependencies of the android_app, merge them with the app's own
one (if exists), transform it to HTML, gzip it, and put it as an asset
in the final APK output.
Bug: 135460391
Test: app_test.go + Built Mainline modules
Change-Id: I52d92e2fd19b3f5f396100424665c5cc344190d8
Merged-In: I52d92e2fd19b3f5f396100424665c5cc344190d8
(cherry picked from commit 5b425e2e20)
Individual module structs normally embed ModuleBase themselves. This
caused duplicate embedding, and so made common properties like notice
inaccessible.
Bug: 135460391
Test: app_test.go, TreeHugger
Change-Id: I5683b194e3de909d480c083a931cc7e871de1d74
Merged-In: I5683b194e3de909d480c083a931cc7e871de1d74
apexDepsMutator can be called on multiple apex modules in parallel,
and then two goroutines could call BuildForApex on the same module
in parallel, leading to a data race appending to apexVariations.
This also results in random ordering of the entries in
apexVariations.
Hold a mutex around appending to apexVariations, and sort it before
passing it to ctx.CreateVariations.
Fixes: 134425751
Test: m nothing
Change-Id: If5a3b53a778daacb3e26ac05cde872cf8eb980b3
Merged-In: If5a3b53a778daacb3e26ac05cde872cf8eb980b3
(cherry picked from commit cefa94bd27)
Allow a cc_prebuilt_library_shared to share the same name as a
cc_library by always creating static and shared variants of
prebuilts so that the variants of the source module are always
a superset of the variants of the target module.
Bug: 131709055
Test: TestPrebuilts
Change-Id: I4afd6d37e6a986d08ad25aee69eca6d994febc6b
Merged-In: I4afd6d37e6a986d08ad25aee69eca6d994febc6b
(cherry picked from commit 33b2fb7333)
Running any executable built with asan and libc_scudo results in crashes.
Bug: 131810078
Test: Built the media processes with the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is not listed in the
Test: mediaextractor and the mediaswcodec binaries.
Test: Build the media processes without the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is listed in the
Test: mediaextractor and the mediaswcodec binaries.
Change-Id: Ie55a0414088787ec11d85fffcb04592ed4f23c57
Merged-In: Ie55a0414088787ec11d85fffcb04592ed4f23c57
(cherry picked from commit 753d4a69d5)
Failures in strip.sh are still occurring with darwinStripPool set to
10, try 5.
Bug: 132822437
Test: none
Change-Id: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40
Merged-In: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40
(cherry picked from commit badf8d691f)
strip.sh can use a file descriptor per .o file when run on .a files,
which can hit the system file descriptor limit on darwin. This
causes failures when manay variants of libgcc_stripped are built
simultaneously. Put all strip rules on darwin into a pool that
limits them to 10 concurrent processes, which will limit the file
descriptor usage to ~7500.
Fixes: 132822437
Test: no mention of darwinStripPool in out/soong/build.ninja on linux
Test: m libgcc_stripped on darwin
Change-Id: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658
Merged-In: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658
(cherry picked from commit ee3ea31a24)
For the sysprop apis, we don't need dist. So the No_dist property is
added for it.
Bug: 132448761
Test: m -j dist
Merged-In: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265
Change-Id: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265
(cherry picked from commit 80a87b3309)
HWASan has a feature to fill malloc() memory with non-zero pattern.
This has found a bug or two in the past, but it also keep causing hard
to debug issues. The main problem is lack of diagnostics - use of
pattern-initialized memory is not an immediate crash. More often than
not it manifests as a subtle change in system behavior.
Having MemorySanitizer on Android would be nice...
This change does not affect any shipping configuration, but improves
stability of testing-only SANITIZE_TARGET=hwaddress build.
Bug: 132803232
Bug: 132652537
Bug: 131438232
Bug: 132810685
Test: SANITIZE_TARGET=hwasan on crosshatch successfully boots in ~100%
attempt (up from ~99% currently).
Change-Id: I7dcbcdf1b8a5b8556e32690327b32f04879e5db1
In order to evaluate the impact of framework classes being in an image.
Test: m
Bug: 119800099
Exempt-From-Owner-Approval: this is only for an experimental config, which we would like to see
the performance before build snap.
(cherry picked from commit feef2ef4d7)
Change-Id: I44ea9d99985c3e9d21602f2c612364d0cef0d1ea
Merged-In: Ib0d3acf8d2718ee443b3bffe8122a54f92257691
This reverts commit 9e2bf9ec51.
Reason for revert: Rolling forward for Q-Finalization
Bug: 129975435
Bug: 129943426
Change-Id: Ic8a09aca67c189edfda4b10e5deb13716eb66adc
Test: Build
We use libgcc as fallback for symbols not present in libclang_rt
builtins, however we didn't know what exact symbols were being used,
some may not be intended to fallback.
Create libgcc_stripped, which only contains unwind symbols from libgcc.
Bug: 29275768
Test: bionic-unit-tests
Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
(cherry picked from commit acee27cd72)
Absense of the flag causes problem when prebuilt_etc is configured with
compile_multilib.
Bug: 130138217
Test: choosecombo to aosp_x86_64 and build
test_com.android.media.swcodec
Check that the test APEX has 32-bit artifacts.
Merged-In: Idd28443d129ff70053295015e69328a8fa3eca47
Change-Id: I6b90668d6effc9f82f7cf3a958d4964e8f06ac8e
Disable a debugging feature in hwasan that seems to be causing flaky selinux
denials in the boot test:
05-02 12:11:11.360 1663 1663 I auditd : type=1400 audit(0.0:8): avc: denied { read } for comm="iptables-wrappe" path="/proc/1015/statm" dev="proc" ino=30968 scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netmgrd:s0 tclass=file permissive=0
I could not reproduce this locally, but this feature has no users and
I've verified that things keep working without it.
This does not affect any shipped product.
Bug: 131438232
Bug: 112438058
Bug: 131845076
Test: crosshatch_hwasan boot test
Change-Id: I08d46d19151e6d5221cdd56fd6864dae224fae25
This reverts commit ca6e927678.
Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th
Bug: 129975435
Change-Id: Ice988aea0cab8ba462166c27b0d7f95fc7d46466
To get performance benefits here for apps that aren't installed
through the play store.
Bug: 130217075
Bug: 131310042
Test: make
Change-Id: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf