This reverts commit a9fd59a7f2.
We are moving the resource shinking pipeline into r8 (gennerally, not just for platform)
This disables the usage of the resource shrinker cli from cmd-line tools
There are no changes in this cl compared to the original land, the fix
was done in R8 (to use the same compression for res folder entries as
in the original)
Bug: 308710394
Bug: 309078004
Test: Existing, validated that resource table on SystemUI was byte<>byte equal, validated uncompression
Ignore-AOSP-First: Merge does not apply cleanly
Change-Id: Ib8a6fb128084e994325b975c46a036cb41494654
We are moving the resource shinking pipeline into r8 (gennerally, not just for platform)
This disables the usage of the resource shrinker cli from cmd-line tools
Bug: 308710394
Test: Existing, validated that resource table on SystemUI was byte<>byte equal.
Change-Id: Ia36b5e5970cbdcff519a5f05d672b44dc145ea32
If the android_app has the use_embedded_native_libs flag
all its JNIs must be stored with the store compression method.
The logic to add JNIs from ARR is as follows:
1) Extract JNI libs from AAR
2) Store JNI libs with deflate
3) Merge deflated JNI libs with APK
This process produces a bogus APK that won't be loaded by the
framework if the use_embedded_native_libs is set as the resulting
APK will have all its merged entries stored as deflate.
To solve the problem in case we merge JNIs with an app requiring
uncompressed JNI we add an extra step to ensure they're compressed
using the store method.
Test: m, verify apk using jni_extract has stored libs
Change-Id: Ic31d47f15412171b5898dd0e2a554cb6bf93293b
This adds a new flag to the optimize section to allow invoking the resource shrinker
Bug: 246217952
Test: m
Change-Id: I2e7851af1189db2a6adf6f9f9f444a1d7f3a8d60
JNI libs present in AAR files are ignored in the build. If those
libraries are necessary, they must be manually extracted and a
prebuilt_cc_library module must be created for them. Instead, we can
extract these libraries and copy them to an output APK as part of the build.
Bug: 228848794
Test: created android_app that depends on an android_library_import with
JNI embedded, and verified that .so libs are present in APK
Test: created android_app that depends on an android_library which
depends on android_library_import with JNI embedded, and verified
that .so libs are present in APK
Test: verified that multiple .so's from a single architecture are copied
to APK
Test: verified that the absence of a jni/<arch> folder or files in the
folder will cause the Ninja action to error
Change-Id: I242a862d7bd881f7a4a8c23493924d8fe441ea25
Previously we were only generating used-by API-coverage for APEX modules.
This change adds support for APK-only modules such as NetworkStack and DocumentsUI.
Bug: b/216313756
Forrest Run: https://android-build.googleplex.com/builds/abtd/run/L10800000953846781
Test: TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86 ./vendor/google/build/build_unbundled_coverage_mainline_module.sh -j16
Change-Id: Id17e4a55c2a52e9903632a654e778f8d54982dfc
Merged-In: Id17e4a55c2a52e9903632a654e778f8d54982dfc
(cherry picked from commit 56d75785bd)
Remove the references to the android package in remotexec so that
the android package can reference the remoteexec package. This
will allow RuleBuilder to integrate directly with remoteexec.
Bug: 182612695
Test: m checkbuild
Change-Id: I15be5ef126d8aacbd605518638f341daf6f31bb3
It looks like there is a bug in rewrapper/reproxy that makes it upload the
output file as an input if it still exists in the output tree. This causes
unnecessary cache misses on incremental builds, and can also cause the
action to fail remotely (depending on the service). By removing the output
file at the beginning of the action, we ensure that it can't be uploaded.
Test: ran against a remote execution server; actions no longer fail remotely
Change-Id: Iaac2b23b35d2c876c0244edbfd4a8f159df0563c
Test: Ran a build with `RBE_JAR="true" RBE_JAR_EXEC_STRATEGY="remote"
RBE_ZIP="true" RBE_ZIP_EXEC_STRATEGY="remote" ... use_rbe m` and that
succeeded.
Bug: b/156765207
Change-Id: Ia17b532fbb282be414adf879914870082dd0841b
This reverts commit 17d69e3484.
Reason for revert: This new field is not useful without dependencies in aosp
Test: builds
Change-Id: I87bd820cd6dbc5274ce3d28c4578381718aa805d
Merged-In: I70d6f7dc751510311b03e245b2189a76b395a49c
If "v4_signature: true" is set, the v4 signature file,
named [outputApkFile].idsig
will be generated along side the outputApkFile.
Test: m nothing
Test: atest PackageManagerShellCommandIncrementalTest
BUG: 149354175
Change-Id: Ie84725a15406f96f65042ea9909460e4eb34d57f
Merged-In: Ie84725a15406f96f65042ea9909460e4eb34d57f
If "v4_signature: true" is set, the v4 signature file,
named [outputApkFile].idsig
will be generated along side the outputApkFile.
Test: m nothing
Test: atest PackageManagerShellCommandIncrementalTest
BUG: 149354175
Change-Id: Ie84725a15406f96f65042ea9909460e4eb34d57f
This time, exclude NDK libraries instead of LLNDK libraries from the
package. This is necessary because there are libraries such as libvndksupport
which are LLNDK but are not accessible to apps.
Original commit message:
> Previously, android_app targets for which a.shouldEmbedJnis(ctx) = true
> (e.g. CtsSelinuxTargetSdk25TestCases) would need to specify all of their
> recursive library dependencies, including for example libc++ when depending
> on the platform libc++. This means unnecessary churn when we add a new
> dependency to libc++ (e.g. libunwind [1]). To avoid the churn and allow
> jni_libs clauses to be simplified, make the build system search for the
> recursive dependencies and automatically include them.
>
> This change allows us to remove code that was previously adding NDK libc++
> as a special case, as it is now covered by the generic code.
>
> Also fix some improper quoting that was exposed as a result of this change
> causing more files to be packaged than before.
>
> [1] https://android-review.googlesource.com/q/topic:%22libunwind-so%22
Bug: 144430859
Test: atest CtsAppOpsTestCases
Test: atest FrameworksNetSmokeTests
Change-Id: I8311ede0b44d7e50b9f272912ead8ef07e82b074
Previously, android_app targets for which a.shouldEmbedJnis(ctx) = true
(e.g. CtsSelinuxTargetSdk25TestCases) would need to specify all of their
recursive library dependencies, including for example libc++ when depending
on the platform libc++. This means unnecessary churn when we add a new
dependency to libc++ (e.g. libunwind [1]). To avoid the churn and allow
jni_libs clauses to be simplified, make the build system search for the
recursive dependencies and automatically include them.
This change allows us to remove code that was previously adding NDK libc++
as a special case, as it is now covered by the generic code.
Also fix some improper quoting that was exposed as a result of this change
causing more files to be packaged than before.
[1] https://android-review.googlesource.com/q/topic:%22libunwind-so%22
Bug: 144430859
Change-Id: I3d6fbcce75bc108a982eb7483992a4b202056339
Move the logic from Make that uses prebuilts for more tools for
unbundled builds, and export the values back to make.
Test: m checkbuild
Change-Id: I8c7031e0feaa9328a2b73db6dc8e63e12d1d12f7
JVM occasionally (0.5% time) crashes on entering a method with SIGSEGV.
It might be due to excessive load on the host machine. Reduce the number
of the compiler threads to 6, and do not start all the GC threads
immediately. If JVM crashes, copy full diagnostics to stderr.
Bug: 132766811
Test: treehugger
Change-Id: Ib7bfd568f6d32456bf623cbb615ffc990c326a34
This reverts commit d71dc6b5e0.
Reason for revert: ag/974065 fixes the problem that caused the revert
Change-Id: I3ba9eecdab34602aaf19fa518520ac932c9b97af
This reverts commit 9d6df2246c.
Reason for revert: This change set the value of JAVA make variable to a string containing "foo bar". When soong_ui is asked to evaluate such string, it drops the quotes, causing bash to treat 'foo' and 'bar' as separate command line arguments.
Change-Id: If4e3c4c950c305bb67a572de3d86119c2da81dc1
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.
This reapplies Id25f55f07a55120bebe2a9b32c094209efc85c8b with fixes
for unbundled builds and builds with ALLOW_MISSING_DEPENDENCIES=true
set.
Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: I964309a68ec4ed081f3f3154879c71048ecb5455
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.
Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: Id25f55f07a55120bebe2a9b32c094209efc85c8b
This is an initial version that handles the most basic cases.
Bug: 128610294
Test: app_test.go + prebuilt webview.apk
Change-Id: Ic525559aad5612987e50aa75b326b77b23acb716
Pass the package_splits list from the property to aapt2 as
--split arguments, sign the extra outputs, install them, and
add them as extra output files for SourceFileProducer.
Bug: 127921149
Test: TestAppSplits
Change-Id: Id94a53ae6a8a68ec81e98abba2fefc9c23feaa7a
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings. Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.
Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
Only put uncompressed native libs in an APK if the min_sdk_version
supports it (>= 23, Marshmallow), and set
android:extractNativeLibs="false" in the AndroidManifest.xml so
that the platform won't extract them anyways.
Bug: 117618214
Test: m checkbuild
Change-Id: I760017e48bf3c6b618aabde0982df45995765d48
aar files should build to the module out directory, not the root of
the out directory. Also give the rules a description so they get a
better status line.
Test: m out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/SystemUI-core.aar
Change-Id: Ie8de0421427985c466d909f83c8e0146f7e0bea8
Use -a option of signapk to specify the alignment to 4K. The default is
4.
Test: m apex.test; zipalign -c -v 4096 $(OUT)/system/apex/apex.test.apex
shows ok
Change-Id: I7b1a3d442b69b89838cf09451939cd23d5646bde
The java resources are merged into the dex jar, split them back
out into the root/ directory for merging into the bundle.
Also avoid running zip2zip when dexJarFile is nil by splitting
each munge step out into its own rule.
Bug: 117295826
Test: tapas RecoveryLocalizer && m dist
Change-Id: Ia22c8768bf2c3c6884792e923caf7624b4f76664
Create a bundle module in addition to creating an APK, which can
then optionally be merged with bundle modules from builds for
other architectures and then be passed to bundletool to create an
app bundle.
Bug: 117295826
Test: tapas RecoveryLocalizer && m dist
Change-Id: I98a17d7407dc56823ece9ec88c087780185a6555