Commit Graph

18075 Commits

Author SHA1 Message Date
Colin Cross f9884fc658 Merge "Set LOCAL_CERTIFICATE for flattened apex APKs"
am: f9192060bd

Change-Id: I968c8fdbe15ccc61f2694fadd6c5a588041e3fd8
2020-01-29 09:59:20 -08:00
Treehugger Robot f9192060bd Merge "Set LOCAL_CERTIFICATE for flattened apex APKs" 2020-01-29 17:42:51 +00:00
Christopher Ferris b3e6f5f64e Merge "Add whole_static_libs to non-svelte configs."
am: c0ebc81e3d

Change-Id: Iff72c2a2a607663452ce7bddcf145d70848acd68
2020-01-29 09:31:09 -08:00
Christopher Ferris c0ebc81e3d Merge "Add whole_static_libs to non-svelte configs." 2020-01-29 17:22:01 +00:00
Ulyana Trafimovich 6a517467aa Merge "Store uncompressed and aligned DEX files for java libs in APEXes."
am: 28e36b1455

Change-Id: Ib6938d0f980604695c46a5ff6dbc8a7ff41e7ab0
2020-01-29 02:32:38 -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
Dan Willemsen d54b9ceacc Merge "Fix rebuilding with whitelisted_files"
am: 70b0162472

Change-Id: I68a8fe22d74a2b7220fa11f76b573de5cce121ed
2020-01-28 18:04:31 -08:00
Treehugger Robot 70b0162472 Merge "Fix rebuilding with whitelisted_files" 2020-01-29 01:54:06 +00:00
Colin Cross 45bf16fa1e Merge "Follow input changes to proptools.CloneEmptyProperties"
am: 0326e19b49

Change-Id: Ic7a9c16c88c3e4983480b48eb353b307137641bd
2020-01-28 17:20:51 -08:00
Treehugger Robot 0326e19b49 Merge "Follow input changes to proptools.CloneEmptyProperties" 2020-01-29 01:13:53 +00:00
Steven Moreland 7600d36807 Merge "bpfix: remove hidl_interface types"
am: ec1339230b

Change-Id: I14c89fcc4e3697e44d2ac24d11f44c79aa19cad0
2020-01-28 16:45:05 -08:00
Treehugger Robot ec1339230b Merge "bpfix: remove hidl_interface types" 2020-01-29 00:43:13 +00:00
Stephen Hines 5cbb2c9c4e Add AUTO_UNINITIALIZE as another option for trivial initialization.
am: 797e1959e3

Change-Id: I100cd72e45ffbce124202cf400ef947b3f62a7c1
2020-01-28 16:41:00 -08: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
Automerger Merge Worker 935c850802 Merge "Add additional variables to ninja variable whitelist" am: 55f3001447
Change-Id: I07caef1498c4d8ce2dc4a75cbc28878db753995d
2020-01-28 20:59:09 +00: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
Automerger Merge Worker 205edb5da3 Merge "Add support for experimentally enabling RBE support on specific rules." am: 5e0dbe4e3e
Change-Id: Ie168aaa15fb183a8b732c0a6f757dce8698c27cb
2020-01-28 20:07:56 +00: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
Jiyong Park 19f69e2fdd Merge "License info for APEXes are correctly gathered"
am: 76fde9212a

Change-Id: I86d447e55f13ca6ce798b662c812f9201bb77fa8
2020-01-28 11:04:28 -08: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
Ulyana Trafimovich 00cc7b0b4d Merge "Fix --boot-image argument in dex2oat command for boot image extension."
am: 911083e3e1

Change-Id: I11c4bedcf0ca964f412d19cb9152eb94ca2fc5b1
2020-01-28 09:20:47 -08: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 3afe2c13a0 Remove unnecessary symlink for non-flattend APEXes
am: 7aa3f76696

Change-Id: I4699574214c1a146b32385eff5260b28275ecf9b
2020-01-28 05:04:28 -08: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
Sasha Smundak 865f0d8900 Merge "If input zip file cannot opened, print its name."
am: 7c78b3c98e

Change-Id: Ia0903ee49082ebf9e59c7eb3be5b922151fea2ef
2020-01-27 17:59:36 -08:00
Treehugger Robot 7c78b3c98e Merge "If input zip file cannot opened, print its name." 2020-01-28 01:48:32 +00:00
Jiyong Park 6ca47f29ce Merge "Abstract sdk_version string using sdkSpec type"
am: 057dd35669

Change-Id: If94bbf31c3d6090b7c21e31beff8bd372c65acc3
2020-01-27 16:28:47 -08:00
Treehugger Robot 057dd35669 Merge "Abstract sdk_version string using sdkSpec type" 2020-01-28 00:07:37 +00:00
Colin Cross aad46116be Merge "Simplify vendor conditionals"
am: b7ec426e01

Change-Id: I0ffd0be502138fb7e8e28e90f7ac058f78f1c7c4
2020-01-27 11:19:02 -08:00
Colin Cross b7ec426e01 Merge "Simplify vendor conditionals" 2020-01-27 19:03:23 +00:00
Martin Stjernholm 90e753d47e Merge changes from topic "revert-1211982-dex2oat-soong-dep-LLLKNULXYJ"
am: 699cf17f53

Change-Id: I5a7f64c6e3888d894b9db9e6db939383adf9809f
2020-01-27 07:10:20 -08: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 0e7b913387 Merge "Revert "Revert "Allow codename.fingerprint format for minSdkVersion"""
am: cf0bba7a30

Change-Id: I3751df1701d90f513b0b2369fd62178737145215
2020-01-24 22:08:43 -08:00
Baligh Uddin cf0bba7a30 Merge "Revert "Revert "Allow codename.fingerprint format for minSdkVersion""" 2020-01-25 04:12:30 +00:00
Colin Cross 22a73155aa Merge "Create a highmem pool and put metalava into it"
am: 6cc0515e82

Change-Id: Ie090845a4a822e2f961de1629630c93a2b2ef59d
2020-01-24 19:12:41 -08:00
Martin Stjernholm fe568ba2a1 Merge changes from topic "dex2oat-soong-dep"
am: cf52e102ce

Change-Id: I5cda6d0f9ac0928e74fb20e93ee508cfc3f74419
2020-01-24 19:08:08 -08:00
Martin Stjernholm 0064a8888e Move the Once cache for dexpreopt.GlobalConfig into the dexpreopt package.
am: dae8a80426

Change-Id: I291349b8f05d977edc467a3e2f5adb78bbf94d64
2020-01-24 19:07:53 -08:00