Commit Graph

1909 Commits

Author SHA1 Message Date
Automerger Merge Worker
27efc54be4 Merge changes from topic "dex2oat-soong-dep" am: cf52e102ce am: fe568ba2a1 am: 1d1c492d20
Change-Id: I4797dc2b8837c1d982dd324aef619354fb61934e
2020-01-25 03:37:03 +00:00
Automerger Merge Worker
ad00cd0fcc Move the Once cache for dexpreopt.GlobalConfig into the dexpreopt package. am: dae8a80426 am: 0064a8888e am: 443178189c
Change-Id: I88bb622216b39dbe45c79deedf602042267ad632
2020-01-25 03:37:01 +00:00
Automerger Merge Worker
2ca3894edc Separate dexpreopt.GlobalSoongConfig to allow independent caching of it. am: be9d0d21d1 am: 852db0c1da am: 8e761f91c8
Change-Id: Ibf451ceb57c5770727ee1674634ef4d37e486213
2020-01-25 03:36:58 +00:00
Martin Stjernholm
dae8a80426 Move the Once cache for dexpreopt.GlobalConfig into the dexpreopt
package.

Preparation for a future CL that will need to get the make-written
GlobalConfig from within dexpreopt.

Also rename the Load*Config functions to Parse*Config, since they don't
actually load the config files anymore.

Bug: 145934348
Test: m
Change-Id: I71df11c1e042ca8135d273a7263e9539ea3cd68f
2020-01-24 22:18:42 +00:00
Martin Stjernholm
335d596384 Get the dex2oat host tool path from module dependency on the binary
module.

This uses the Once cache for GlobalSoongConfig to propagate the dex2oat
path from a module dependency to the singletons (both the one that
writes out dexpreopt_soong.config and the one that creates the
dexpreopted boot images). Unless dexpreopting is disabled altogether
through DisablePreopt in dexpreopt.config, that means:

- We must ensure at least one module registers a dex2oat tool
  dependency and resolves a GlobalSoongConfig using it, or else the
  singletons fail. That means we litter dex2oat dependencies in java
  modules even when they won't get dexpreopted and hence don't really
  need them.

- We still assume there's at least one java_library or android_app in
  the build.

Bug: 145934348
Test: m
  (check that out/soong/dexpreopt_soong.config points to dex2oatd64)
Test: env USE_DEX2OAT_DEBUG=false m
  (check that out/soong/dexpreopt_soong.config points to dex2oat)
Test: env OUT_DIR=out-tools prebuilts/build-tools/build-prebuilts.sh
  on the aosp-build-tools branch
Change-Id: I38317f2d5e5cf6822f87daae25745767c8a3656c
2020-01-24 22:18:42 +00:00
Martin Stjernholm
be9d0d21d1 Separate dexpreopt.GlobalSoongConfig to allow independent caching of
it.

Introduce a Once cache for GlobalSoongConfig to allow it to get binary
tool paths from ordinary module dependencies (coming in a future CL)
that are then reused in singletons.

Bug: 145934348
Test: m
Change-Id: I440a09dba7d337965a196527566b0966a18e3653
2020-01-24 22:09:54 +00:00
Automerger Merge Worker
4efd8ba93c Do not remove RRO resources am: f0f747c949 am: 033eeada51 am: 3643cd99e7
Change-Id: I64254d6a94d49311da61022bc5a744ac26632bbf
2020-01-24 21:36:19 +00:00
Jaewoong Jung
f0f747c949 Do not remove RRO resources
Resource configs should not be deduped when building RROs since it
would be impossible to override some resource configs with the same
value as the default config. Also, aapt2 removes resources that do not
have default configurations. If an overlay attempts to overlay a
non-default configuration without overlaying the default, the resource
will be removed and the value will not be overlaid at all.

Bug: 146227008
Fixes: 119811120
Test: app_test.go
Change-Id: I834a58b18d1e74a0f6b3de3d0523009788787e42
2020-01-24 10:35:52 -08:00
Automerger Merge Worker
1ae81e980a Merge "Add runtime_resource_overlay." am: 84f71af41c am: 51e926c45d am: 8f84cbc441
Change-Id: Ia827ca892800111c8530d617c2275f0b8ba62776
2020-01-24 01:01:36 +00:00
Treehugger Robot
84f71af41c Merge "Add runtime_resource_overlay." 2020-01-24 00:23:42 +00:00
Jaewoong Jung
9befb0c326 Add runtime_resource_overlay.
Fixes: 119811120
Test: app_test.go
Test: Converted and built IconPackFilledSystemUIOverlay
Change-Id: I71841148c25f820ba829f751a201d2c771c8bd20
2020-01-23 14:24:41 -08:00
Automerger Merge Worker
4acb8f82c8 Merge "For JIT-zygote config, add "apex" boot image files to the ART apex." am: c18235cb86 am: 4504c82639 am: e663326c09
Change-Id: Ifeef80c0aef719076ec869423906228b4ced26f3
2020-01-23 12:32:27 +00:00
Ulya Trafimovich
7eebb4f4e8 For JIT-zygote config, add "apex" boot image files to the ART apex.
JIT-zygote boot image was split into primary and framework extension
in CL I5493e575ebf90bad1d5ad2850004d54590bbc079, but that CL forgot to
add JIT-zygote boot image files to the ART apex. Add them now.

Test: Steps 1-3:

  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

  3. Ensure that apex.art and apex-framework.art are mapped in the
    JIT-zygote address space:

    $ adb shell cat /proc/`adb shell ps | grep zygote64 | awk {'print $2'}`/maps | grep apex.art
    6ffde000-70102000 rw-p 00000000 00:00 0                                  [anon:dalvik-/apex/com.android.art/javalib/apex.art]
    701e5000-70262000 rw-p 00000000 00:00 0                                  [anon:dalvik-/apex/com.android.art/javalib/apex.art]
    72715cf000-72715d4000 r--p 000ba000 07:98 93                             /apex/com.android.art/javalib/arm64/apex.art

    $ adb shell cat /proc/`adb shell ps | grep zygote64 | awk {'print $2'}`/maps | grep apex-framework.art
    7084b000-70cc2000 rw-p 00000000 00:00 0                                  [anon:dalvik-/system/framework/apex-framework.art]
    70fd8000-71109000 rw-p 00000000 00:00 0                                  [anon:dalvik-/system/framework/apex-framework.art]
    7271517000-7271526000 r--p 00295000 fc:00 1268                           /system/framework/arm64/apex-framework.art

Change-Id: I985e15de9f38f345ba3e99451c6d9b8e2cb5d698
2020-01-22 15:27:08 +00:00
Automerger Merge Worker
ed9176a259 Merge "Remove unused java_sdk_library_import properties" am: 0c9c0f045f am: 07e5b368c7 am: 1bb242bb7a
Change-Id: Ie82fa67604ef2cd46d28411a4b9c1db47a6bad74
2020-01-22 06:42:15 +00:00
Treehugger Robot
0c9c0f045f Merge "Remove unused java_sdk_library_import properties" 2020-01-22 06:03:25 +00:00
Paul Duffin
29f5576357 Remove unused java_sdk_library_import properties
The properties are just passed through to the java_import module that
it creates to import the stubs so could be used if set. However, none
of the current usages of java_sdk_library_import actually set them and
it is not clear why the following would ever be set on
java_sdk_library_import:
* installable
* exclude_files
* exclude_dirs

The above properties look as though they were simply copied from the
ImportProperties struct.

The libs property is also unused but it seems as though it should be
used to improve compatibility with the source module. e.g.
the source module for android.test.runner has android.test.base and
android.test.mock in its libs. However, the prebuilt version of it
does not.

Bug: 148080325
Test: m nothing
Change-Id: I710e3962b2e34b2b0cc81685d07d4948cef4e6ad
2020-01-21 18:37:58 +00:00
Automerger Merge Worker
1660ac1fb6 Merge "Revert "Allow codename.fingerprint format for minSdkVersion"" am: 070d69c74c am: 42a16b7d69 am: 7245755399
Change-Id: Ifcea8861733463b92a46de6ca08b2d6a8ec0a090
2020-01-21 14:51:42 +00:00
Pete Gillin
230e241f58 Revert "Allow codename.fingerprint format for minSdkVersion"
This reverts commit 014a85712d.

Reason for revert: Caused vendor/google/build/build_mainline_modules.sh to fail with `Error: minSdkVersion (10000) is greater than maxSdkVersion (30)`.

Bug: 130541924
Change-Id: Ifa233bf40a674481d21b61ee816c5fdde8201080
2020-01-21 13:44:50 +00:00
Automerger Merge Worker
52337edeb4 Merge "Allow codename.fingerprint format for minSdkVersion" am: 1cc755ac9f am: da726a802c am: c7caac1032
Change-Id: I9b6ee2bf0c0328bf496affd960fe67ef0b0fe30d
2020-01-21 02:33:59 +00:00
Baligh Uddin
014a85712d Allow codename.fingerprint format for minSdkVersion
Use codename.fingerprint format for minSdkVersion if it is unset
in the manifest and
UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Using a utility function in sdk.go to check whether to apply
api.fingerprint.

BUG: 130541924
Change-Id: I748a25c419033bf54b63171d334644fcd0ecc78f
2020-01-20 07:46:12 -08:00
Automerger Merge Worker
e6d1cb1f29 Merge "Overwrite test-file-name in test config." am: a929cd52ce am: b3dd640c9f am: 4dddde24ae
Change-Id: I3ed6f25ded54a962ea0650285e0522206cb4864b
2020-01-17 22:29:32 +00:00
Jaewoong Jung
a929cd52ce Merge "Overwrite test-file-name in test config." 2020-01-17 19:07:12 +00:00
Jaewoong Jung
3998234d8c Overwrite test-file-name in test config.
If the install apk name is different than the module name, use
test_config_fixer to update the test-file-name value in the config.

Test: app_test.go
Fixes: 147375216
Change-Id: I2141eeebbb3552995400b45634712306673fd812
2020-01-17 06:08:12 -08:00
Anton Hansson
a8b44b6ecb Merge "Add framework-sdkextensions to jars to instrument" 2020-01-17 13:14:51 +00:00
Anton Hansson
91133e6e44 Add framework-sdkextensions to jars to instrument
Required to get code coverage.

Bug: 143937446
Test: verify LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is set
      for framework-sdkextensions
Change-Id: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
Merged-In: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
(cherry picked from commit 9492b09dae)
2020-01-17 09:57:52 +00:00
Anton Hansson
9492b09dae Add framework-sdkextensions to jars to instrument
Required to get code coverage.

Bug: 143937446
Test: verify LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is set
      for framework-sdkextensions
Change-Id: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
2020-01-17 09:56:37 +00:00
Automerger Merge Worker
4c167ae85d Merge "Save compilation units in protobuf format." am: 1be2d48005 am: e0703cdd88 am: 0a5b3ff2b7
Change-Id: I1d9d4c999b72443c36f992050987962a55cb4056
2020-01-16 19:27:17 +00:00
Treehugger Robot
1be2d48005 Merge "Save compilation units in protobuf format." 2020-01-16 18:55:26 +00:00
Automerger Merge Worker
d84989724b Merge changes I0668ff5a,Iff2d7063,I6f8b1e2d,I126db49d,Ic6582260 am: a35294889f am: 273045701d am: 2e84d4d4ea
Change-Id: I169c252ec78ad9846b86673bcfbc3eda08059552
2020-01-16 02:33:21 +00:00
Automerger Merge Worker
b0f501acad Merge "Add basic test for java_system_modules" am: 0b3a5781a9 am: d3a2e1e36e am: da72ba68cc
Change-Id: I4b42a9a83adfef1e392b5b9cae2fc23e4b1dbf9c
2020-01-16 02:12:27 +00:00
Treehugger Robot
a35294889f Merge changes I0668ff5a,Iff2d7063,I6f8b1e2d,I126db49d,Ic6582260
* changes:
  Exclude source->prebuilt deps from visibility enforcement
  Dedup package build components registration
  Support registering hard coded pre arch mutators
  Added java_system_modules_import
  Document java_system_modules
2020-01-16 02:09:36 +00:00
Treehugger Robot
0b3a5781a9 Merge "Add basic test for java_system_modules" 2020-01-16 02:03:44 +00:00
Automerger Merge Worker
cd3f58cf76 Merge "Keep signatures of presigned prebuilt test apps." am: 275eb69d0a am: fc81db1149 am: b05bf4c82e
Change-Id: I0537ff7d08e9ee8e79287dca5d60e30aa8b2e4f7
2020-01-15 23:43:24 +00:00
Jaewoong Jung
275eb69d0a Merge "Keep signatures of presigned prebuilt test apps." 2020-01-15 23:17:02 +00:00
Sasha Smundak
6c2d4f91f8 Save compilation units in protobuf format.
Bug: 146224091
Test: manual
Change-Id: I7a856bab13f54c78efa0061421c3fcb9341bc6e7
2020-01-15 12:40:03 -08:00
Jaewoong Jung
7c5bd835d0 Keep signatures of presigned prebuilt test apps.
Skip the JNI uncompress step for presigned prebuilt test apps. They
don't need it, and they can invalidate the signature. Also, fix the
install partition of prebuilt test apps.

Fixes: 143472191
Test: app_test.go
Test: Converted CtsShimPrivUpgradePrebuilt to bp and checked the
final output apk signature.

Change-Id: Ied7d3576b5db4de40a9ca9e388336229d07212f5
2020-01-15 14:33:32 +00:00
Paul Duffin
a7b9f42587 Add basic test for java_system_modules
Bug: 142940300
Test: m nothing
Change-Id: I8855df0832f93e40d31e457191590458c274bb5c
2020-01-15 11:17:57 +00:00
Paul Duffin
90169baf0e Added java_system_modules_import
A prebuilt version of java_system_modules. It does not import the
generated system module, it generates the system module from imported
java libraries in the same way that java_system_modules does. It just
acts as a prebuilt, i.e. can have the same base name as another module
type and the one to use is selected at runtime.

Bug: 142940300
Test: m nothing
Change-Id: I126db49d18294fcd6e2b7ad0237f83e9c2fdef7a
2020-01-15 11:17:57 +00:00
Paul Duffin
cded5ecfc3 Document java_system_modules
Bug: 142940300
Test: m nothing
Change-Id: Ic658226088615dbeeef15f17dbb095a968e0742d
2020-01-15 11:17:57 +00:00
Automerger Merge Worker
901c8e6287 Merge "Reland^2 "m <apex_name>-deps-info prints the internal/external deps of the APEX"" am: 814bebb8ea am: 8d050e8e6e am: a7c65b295e
Change-Id: Ib50d00c8cf7f1c6cefd17d9dfa51a4b45835236f
2020-01-15 06:44:21 +00:00
Treehugger Robot
814bebb8ea Merge "Reland^2 "m <apex_name>-deps-info prints the internal/external deps of the APEX"" 2020-01-15 06:12:45 +00:00
Automerger Merge Worker
5c44036fc5 Merge "Allow sdk and core modules to use sysprop_library" am: a46c2b1994 am: ed000d7832 am: 4ad8d0d859
Change-Id: I001549e1fed24999f435e950c8b523dae01a6ed8
2020-01-15 01:26:17 +00:00
Inseob Kim
a46c2b1994 Merge "Allow sdk and core modules to use sysprop_library" 2020-01-15 00:32:00 +00:00
Automerger Merge Worker
d1b3d7df93 Merge "Make android_test_helper_app support apex_available" am: ee76fba905 am: 305b6a7e4e am: 2788a6061e
Change-Id: I93e281df1ceff2d3d3f8d26b00ca038bdf8fa503
2020-01-14 13:25:14 +00:00
Anton Hansson
ee76fba905 Merge "Make android_test_helper_app support apex_available" 2020-01-14 12:59:17 +00:00
Jiyong Park
83dc74b770 Reland^2 "m <apex_name>-deps-info prints the internal/external deps of the APEX"
This reverts commit 7cb4d378e7.

Test: m
Test: ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=out/dist ./art/tools/dist_linux_bionic.sh -j80 com.android.art.host
(in the master-art-host branch)

Change-Id: I9beca73aafdf42f03bfa19cf1634b2641dac417b
2020-01-14 18:40:56 +09:00
Automerger Merge Worker
17f7140e2f Merge "Revert "Reland "m <apex_name>-deps-info prints the internal/external deps of the APEX"""" am: a7503367cf am: 39ed342b9b am: 9651bdef91
Change-Id: I1b22374e4a5698f15576c6daf474e6797318feb9
2020-01-14 09:30:56 +00:00
Jiyong Park
a7503367cf Merge "Revert "Reland "m <apex_name>-deps-info prints the internal/external deps of the APEX"""" 2020-01-14 08:58:17 +00:00
Jiyong Park
7cb4d378e7 Revert "Reland "m <apex_name>-deps-info prints the internal/external deps of the APEX"""
This reverts commit 956305c61c.

Reason for revert: broke master-art-host branch
Exempt-From-Owner-Approval: reverting a bad change

Change-Id: Id7faed4ee85328c7c65847a3543ea9e67a3d50b3
2020-01-14 08:58:02 +00:00
Inseob Kim
c52395135f Allow sdk and core modules to use sysprop_library
This allows javaSdk and javaCore modules to link against Public stub of
Platform owned sysprop_library.

Bug: 141246285
Test: m nothing
Change-Id: Ie11c43cc72ddd0ee13e4163955775c13eb9dbe92
2020-01-14 15:58:59 +09:00