Commit graph

17317 commits

Author SHA1 Message Date
Dan Albert
6bba644205 Update NDK ABIs config away from armv5.
Test: treehugger
Bug: None
Change-Id: I0e4909e8a394814edbcc3e9f80d3a6e4a273127b
2020-01-30 16:26:41 -08:00
Treehugger Robot
29fd971526 Merge changes I99cdff4b,Ia6b5cff8,I0f438509
* changes:
  Allow an arbitrary tag to be associated with a bp property
  Rewrite code for creating versioned modules as a transformation
  Add support for transforming a module
2020-01-30 23:12:39 +00:00
Treehugger Robot
44fc5d201f Merge "Use merge_csv python_binary." 2020-01-30 15:18:58 +00:00
Paul Duffin
5b511a200e Allow an arbitrary tag to be associated with a bp property
This is preparation for enhancing the versioning tranformer to support
applying per property transformations. Specifically, to allow
properties to reference other libraries within the sdk.

Bug: 142940300
Test: m nothing
Change-Id: I99cdff4b407763ed395ff358d8110a63c6cf5589
2020-01-30 11:45:47 +00:00
Paul Duffin
e6c0d845fd Rewrite code for creating versioned modules as a transformation
Moves the code for transforming an unversioned module into a
versioned module into a transformer.

This is preparation for enhancing the versioning tranformer to support
applying per property transformations. Specifically, to allow
properties to reference other libraries within the sdk.

Bug: 142940300
Test: m nothing
Change-Id: Ia6b5cff8e1b5cd7232e031769d9fc0019e815fcb
2020-01-30 11:45:47 +00:00
Paul Duffin
b4d9c1f0ef Add support for transforming a module
Adds support for transforming a bpModule using a bpTransformer
instance. Rewrites the deepCopy code as a transformer.

This is preparation for allowing the update process to perform
per property transformations when transforming an unversioned
prebuilt module to a versioned prebuilt module for use by a
versioned snapshot.

Bug: 142940300
Test: m nothing
Change-Id: I0f438509df23bbb8a5862541b6fbfb1d5fbc06f6
2020-01-30 11:45:47 +00:00
Colin Cross
041ac6f2ce Merge "Allocate OutputPath.String in PathForOutput" 2020-01-30 05:06:35 +00:00
Treehugger Robot
1562752fc6 Merge "build: soong: windres: use clang to preprocess" 2020-01-30 02:21:02 +00:00
Elliott Hughes
c2fea18fce Merge "Always use RELR for Rust." 2020-01-30 01:35:48 +00:00
Colin Cross
d63c9a7fc1 Allocate OutputPath.String in PathForOutput
In an AOSP aosp_blueline-userdebub build, OutputPath.String was
allocating 802MB of strings in filepath.Join to prepend the
out dir to each path.  Allocate the joined string in PathForOutput
instead, which results in ~57MB of new allocations in PathForOutput
but no allocations in OutputPath.String.

Test: all soong tests
Change-Id: Id452e0c46a2aeda71bfac11a227bb6edb8e3523d
2020-01-29 16:56:37 -08:00
Nick Desaulniers
18eeffa4ce build: soong: windres: use clang to preprocess
Otherwise binaries under:
prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/bin/
are being invoked.

https://sourceware.org/binutils/docs-2.33.1/binutils/windres.html
states:
When windres reads an rc file, it runs it through the C preprocessor first.

Use the `--preprocessor` flag to specify the exact command to run. The
args to the preprocessor get wiped out when setting that flag, so
`-E -xc-header -DRC_INVOKED` must be re-passed, else clang will error as
it tries to invoke ld.

Once AOSP packages llvm-rc, aosp/1206346 can be rebased on top, so this
patch should be a short lived change.

Bug: 147295872
Test: <remove mingw gcc> && lunch aosp_x86-eng && \
  cd external/mdnsresponder && mm
Change-Id: Ic0e6b75e7e964ee9f9757e534cddd16438604c34
Suggested-by: Pirama Arumuga Nainar <pirama@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2020-01-29 16:28:06 -08:00
Elliott Hughes
730573cfc4 Merge "Use relocation-packer style relocation packing between 23 and 28." 2020-01-29 22:18:06 +00:00
Steven Laver
7a833bdf2b Merge "Don't check library variant identicalness for VNDK extensions" 2020-01-29 21:26:48 +00:00
Treehugger Robot
f9192060bd Merge "Set LOCAL_CERTIFICATE for flattened apex APKs" 2020-01-29 17:42:51 +00:00
Christopher Ferris
c0ebc81e3d Merge "Add whole_static_libs to non-svelte configs." 2020-01-29 17:22:01 +00:00
Steven Laver
025d98162b Don't check library variant identicalness for VNDK extensions
These libraries don't have a core variant against which to check
for identicalness.

Bug: 148526685
Test: built a previously failing target with this change (succeeded)
Change-Id: Ide8ec58df1868175f52c005bf73bb81fc196a571
2020-01-29 08:23:09 -08:00
Ulyana Trafimovich
28e36b1455 Merge "Store uncompressed and aligned DEX files for java libs in APEXes." 2020-01-29 10:25:33 +00:00
Treehugger Robot
70b0162472 Merge "Fix rebuilding with whitelisted_files" 2020-01-29 01:54:06 +00:00
Elliott Hughes
c5960d61cd Always use RELR for Rust.
Rust has no backwards compatibility concerns, so no need to use
--use-android-relr-tags here.

Bug: http://b/147452927
Test: treehugger
Change-Id: I94de40bfad1ff2dcbc4241b944db90e0891bf9f3
2020-01-28 17:30:16 -08:00
Treehugger Robot
0326e19b49 Merge "Follow input changes to proptools.CloneEmptyProperties" 2020-01-29 01:13:53 +00:00
Treehugger Robot
ec1339230b Merge "bpfix: remove hidl_interface types" 2020-01-29 00:43:13 +00:00
Dan Willemsen
81e43c5994 Fix rebuilding with whitelisted_files
All commands must produce their output files, or they'll trigger
rebuilds the next build.

Test: m com.android.apex.cts.shim.v3; repeat; "ninja: nothing to do"
Change-Id: If30e9d90ce3efc0689cd04ac62cc8207f3a38dd5
2020-01-28 15:40:19 -08:00
Stephen Hines
797e1959e3 Add AUTO_UNINITIALIZE as another option for trivial initialization.
This lets us test uninitialized variables even if we change the defaults
for -ftrivial-auto-var-init.

Bug: 131390872
Test: AUTO_UNINITIALIZE=true m
Change-Id: I2b4473a0547dc9c4d9f081d8af2d283f17f66f7a
2020-01-28 14:43:11 -08:00
Colin Cross
503c1d06e8 Set LOCAL_CERTIFICATE for flattened apex APKs
Leaving out LOCAL_CERTIFICATE for flattened apex APKs causes
the apkcerts.txt to have empty keys for those APKs, which
confuses the signing tools.  Set LOCAL_CERTIFICATE for them.

Also refactor the Certificate support to avoid introducing
duplicated handling for presigned certificates.

Bug: 147765187
Test: m apkcerts-list
Change-Id: Ife07661761cd5a89c9f009b8ce041db4dff9ec54
2020-01-28 14:03:08 -08:00
Elliott Hughes
da909feb95 Use relocation-packer style relocation packing between 23 and 28.
Bug: http://b/147452927
Test: treehugger
Change-Id: I8197dcb7884993d75775eaea667981d7822d6d1d
2020-01-28 13:08:40 -08:00
Treehugger Robot
55f3001447 Merge "Add additional variables to ninja variable whitelist" 2020-01-28 20:40:31 +00:00
Colin Cross
43e789d667 Follow input changes to proptools.CloneEmptyProperties
Test: m checkbuild
Change-Id: I1fd53d03722d134009f7ed663f05bd6dc5980dd1
2020-01-28 12:17:06 -08:00
Christopher Ferris
c71193ae53 Add whole_static_libs to non-svelte configs.
This is to support enabling scudo only for non-svelte configs.

Also, add exclude_static_libs to allow removing the jemalloc libs.

Bug: 137795072

Test: Verified that a svelte and non-svelte config can use this method
Test: to properly choose between scudo and jemalloc.

Change-Id: Iec6bfe159f8491138e93dde1d225a8c874c7ce31
2020-01-28 12:02:46 -08:00
Ramy Medhat
5e0dbe4e3e Merge "Add support for experimentally enabling RBE support on specific rules." 2020-01-28 19:49:05 +00:00
Treehugger Robot
76fde9212a Merge "License info for APEXes are correctly gathered" 2020-01-28 18:56:47 +00:00
Kousik Kumar
0f095e1e65 Add additional variables to ninja variable whitelist
These variables control whether we accept cached-results / not and
whether we should update the cache with locally executed results or not.
I need accpet-cached whitelisted to purge the the RBE cache for the
invalid cache entry we have set for the failure we say yesterday.

Bug: b/148387048

Change-Id: I7344fc083f82e0b7bc11084376a267d19cf30bb8
2020-01-28 10:56:04 -08:00
Ramy Medhat
8ea054a81e Add support for experimentally enabling RBE support on specific rules.
This CL adds RBE support to javac, r8, and d8 rules which is only
enabled if respective environment variables are set.

Test: an aosp_crosshatch build with and without the new variables.
Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
2020-01-28 12:42:47 -05:00
Jiyong Park
19972c7935 License info for APEXes are correctly gathered
This change fixes a bug that license info for non-flattened APEXes are
not captured in /system/etc/NOTICE.xml.gz file. For non-flatted APEXes,
we have been creating NOTICE.html.gz file by concatenating all the
license infos of the modules that contributes to the APEX and embedding
the file into the asset directory of the APEX. Then at runtime, the info
is shown through the "Google Play System Update Licenses" UI. However,
this was problematic because the UI only shows license info for the
Google-signed APEXes, leaving OEM-signed APEXes (a.k.a. optional
modules).

The problem is now fixed by associating a merged license file with each
APEX and exporting them to Make, so that the merged license files are
included in the partition level /system/etc/NOTICE.xml.gz file
regardless of whether the APEX is a Google-signed one or not.

This also fixes a bug that license info entries are created for the
runtime paths /apex/<apex_name>/<path_to_a_file>, which is not necessary
as they are already included in the license info of the containing APEX.

Bug: N/A
Test: Go to Settings->About Phone->Legal information and check
that a) /system/apex/*.apex files are shown and b) /apex/<apex_name>/*
files are not shown

Change-Id: I2c25c803b6a4c39b24bb3f724502699382fab50c
2020-01-28 17:20:45 +00:00
Ulyana Trafimovich
911083e3e1 Merge "Fix --boot-image argument in dex2oat command for boot image extension." 2020-01-28 17:04:38 +00:00
Ulya Trafimovich
b0a2d37dcb Fix --boot-image argument in dex2oat command for boot image extension.
The primary image name should be "boot.art" in case of
"boot-framework.art", and "apex.art" in case of "apex-framework.art".
Although "boot.art" and "apex.art" are identical binaries, dex2oat
has hard-coded logic based on the image name.

This has been broken since boot image extension has been enabled for
JIT-zygote config in CL I5493e575ebf90bad1d5ad2850004d54590bbc079.

Test: compare boot-framework.art and apex-framework.art,
  they were identical before this CL, and differ after this CL.

Test: JIT-zygote config boots, steps 1-2:

  1. Temporarily enable Jit zygote in the product device config (in
    this case device/google/muskie/aosp_walleye.mk):

    +# System server should not contain compiled code.
    +PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := verify
    +
    +# Use the apex image for preopting.
    +DEXPREOPT_USE_APEX_IMAGE := true
    +
    +# Have the runtime pick up the apex image.
    +PRODUCT_PROPERTY_OVERRIDES += \
    +    dalvik.vm.boot-image=/apex/com.android.art/javalib/apex.art:/system/framework/apex-framework.art

  2. Build and flash:
    $ lunch aosp_walleye-userdebug && m \
    && adb reboot bootloader && fastboot flashall -w

Change-Id: I98de271852ecc33feb9fd4c9b0addf0feba01856
2020-01-28 14:42:41 +00:00
Jiyong Park
7aa3f76696 Remove unnecessary symlink for non-flattend APEXes
This change fixes a bug that symlinks to the system partition are
created in /system/apex/<apex_name> directories even when the APEXes are
non-flattened. The symlinks are needed only for flattened APEX (of
course regardless of whether the APEX is a primary one or not).

Bug: N/A
Test: examine /system/apex directory manually
Change-Id: I00bb1423d0a2497408f05e49767b42437210bab8
2020-01-28 16:51:34 +09:00
Treehugger Robot
7c78b3c98e Merge "If input zip file cannot opened, print its name." 2020-01-28 01:48:32 +00:00
Treehugger Robot
057dd35669 Merge "Abstract sdk_version string using sdkSpec type" 2020-01-28 00:07:37 +00:00
Colin Cross
b7ec426e01 Merge "Simplify vendor conditionals" 2020-01-27 19:03:23 +00:00
Martin Stjernholm
699cf17f53 Merge changes from topic "revert-1211982-dex2oat-soong-dep-LLLKNULXYJ"
* changes:
  Revert "Separate dexpreopt.GlobalSoongConfig to allow independen..."
  Revert "Move the Once cache for dexpreopt.GlobalConfig into the ..."
  Revert "Get the dex2oat host tool path from module dependency on..."
2020-01-27 13:47:31 +00:00
Hans Boehm
e4b5342d43 Revert "Separate dexpreopt.GlobalSoongConfig to allow independen..."
Revert submission 1211982-dex2oat-soong-dep

Reason for revert: Build failures. See b/148312086.

Reverted Changes:
Ibc427a9a8: Make dex2oat(d) visible for use as implicit dexpre...
I71df11c1e: Move the Once cache for dexpreopt.GlobalConfig int...
I38317f2d5: Get the dex2oat host tool path from module depende...
I440a09dba: Separate dexpreopt.GlobalSoongConfig to allow inde...

Bug: 148312086
Bug: 145934348
Exempt-From-Owner-Approval: Plain revert
Change-Id: Ice3990225635a737e49e9aed7373f06516fccea3
2020-01-27 13:44:24 +00:00
Hans Boehm
453bf09853 Revert "Move the Once cache for dexpreopt.GlobalConfig into the ..."
Revert submission 1211982-dex2oat-soong-dep

Reason for revert: Build failures. See b/148312086.

Reverted Changes:
Ibc427a9a8: Make dex2oat(d) visible for use as implicit dexpre...
I71df11c1e: Move the Once cache for dexpreopt.GlobalConfig int...
I38317f2d5: Get the dex2oat host tool path from module depende...
I440a09dba: Separate dexpreopt.GlobalSoongConfig to allow inde...

Bug: 148312086
Bug: 145934348
Exempt-From-Owner-Approval: Plain revert
Change-Id: I6b656afb5feaad70d958b9d38b6c6eab7b03fba1
2020-01-27 13:44:03 +00:00
Hans Boehm
7b2e6f3ed7 Revert "Get the dex2oat host tool path from module dependency on..."
Revert submission 1211982-dex2oat-soong-dep

Reason for revert: Build failures. See b/148312086.

Reverted Changes:
Ibc427a9a8: Make dex2oat(d) visible for use as implicit dexpre...
I71df11c1e: Move the Once cache for dexpreopt.GlobalConfig int...
I38317f2d5: Get the dex2oat host tool path from module depende...
I440a09dba: Separate dexpreopt.GlobalSoongConfig to allow inde...

Bug: 148312086
Bug: 145934348
Exempt-From-Owner-Approval: Plain revert
Change-Id: I0cf6fef04434fd3c0b7957ee9abdcaabeb20b9d8
2020-01-27 13:01:16 +00:00
Ulya Trafimovich
f491dde8ea Store uncompressed and aligned DEX files for java libs in APEXes.
Test: aosp_walleye-userdebug boots.

Test: In internal, cherry-picked this CL, walleye-userdebug boots.

Test: In internal, ensure that DEX file wifi-service.jar in the
  com.android.wifi APEX is now stored uncompressed:

    $ zipinfo out/target/product/walleye/apex/com.android.wifi/javalib/wifi-service.jar
    Archive:  out/target/product/walleye/apex/com.android.wifi/javalib/wifi-service.jar
    Zip file size: 3086879 bytes, number of entries: 3
    -rw----     2.0 fat  3086304 b- stor 08-Jan-01 00:00 classes.dex
    -rw----     2.0 fat      339 b- defN 80-Feb-01 00:00 META-INF/proguard/androidx-annotations.pro
    -rw----     2.0 fat       45 b- defN 08-Jan-01 00:00 META-INF/MANIFEST.MF
    3 files, 3086688 bytes uncompressed, 3086480 bytes compressed:  0.0%

  Before the change it was:

    $ zipinfo out/target/product/walleye/apex/com.android.wifi/javalib/wifi-service.jar
    Archive:  out/target/product/walleye/apex/com.android.wifi/javalib/wifi-service.jar
    Zip file size: 1241938 bytes, number of entries: 3
    -rw----     2.0 fat  3086304 bl defN 08-Jan-01 00:00 classes.dex
    -rw----     2.0 fat      339 b- defN 80-Feb-01 00:00 META-INF/proguard/androidx-annotations.pro
    -rw----     2.0 fat       45 b- defN 08-Jan-01 00:00 META-INF/MANIFEST.MF
    3 files, 3086688 bytes uncompressed, 1241526 bytes compressed:  59.8%

Bug: 148099857
Bug: 146984232

Change-Id: Ia302967b280be85665032cc870c5d5d2419586fc
2020-01-27 10:19:10 +00:00
Jiyong Park
6a927c4e6a Abstract sdk_version string using sdkSpec type
The value format that sdk_version (and min_sdk_version, etc.) can have
has consistently evolved and is quite complicated. Furthermore, with the
Mainline module effort, we are expected to have more sdk_versions like
'module-app-current', 'module-lib-current', etc.

The goal of this change is to abstract the various sdk versions, which
are currently represented in string and is parsed in various places,
into a type called sdkSpec, so that adding new sdk veresions becomes
easier than before.

The sdk_version string is now parsed in only one place 'SdkSpecFrom', in
which it is converted into the sdkSpec struct. The struct type provides
several methods that again converts sdkSpec into context-specific
information such as the effective version number, etc.

Bug: 146757305
Bug: 147879031
Test: m
Change-Id: I252f3706544f00ea71c61c23460f07561dd28ab0
2020-01-25 21:56:43 +09:00
Baligh Uddin
cf0bba7a30 Merge "Revert "Revert "Allow codename.fingerprint format for minSdkVersion""" 2020-01-25 04:12:30 +00:00
Treehugger Robot
6cc0515e82 Merge "Create a highmem pool and put metalava into it" 2020-01-25 01:09:43 +00:00
Colin Cross
9d34f35815 Simplify vendor conditionals
Support vendor conditionals with no Go code.

Test: TestSoongConfigModule
Change-Id: I42546e7f17324921ada80f4d8e1cd399830f8dfc
2020-01-24 16:43:40 -08:00
Treehugger Robot
cf52e102ce Merge changes from topic "dex2oat-soong-dep"
* changes:
  Get the dex2oat host tool path from module dependency on the binary module.
  Move the Once cache for dexpreopt.GlobalConfig into the dexpreopt package.
  Separate dexpreopt.GlobalSoongConfig to allow independent caching of it.
2020-01-25 00:38:19 +00:00
Baligh Uddin
f62013736a Revert "Revert "Allow codename.fingerprint format for minSdkVersion""
This reverts commit 230e241f58.

Reason for revert: This is a revert of a revert.  Downstream problem has been fixed and have been validated locally and via Forrest build.

Change-Id: I89c51d25b3adb818ea44a983d0ac681a88790d8c
2020-01-24 23:15:44 +00:00