Commit graph

18399 commits

Author SHA1 Message Date
Automerger Merge Worker
1b8156a3cf Merge "Use precise class loader context for system server jars." am: 394b9b379a
Change-Id: Ie9f00ab2e36189a513131d48fc9defecb31f0d94
2020-02-13 17:25:11 +00:00
Martin Stjernholm
75a48d8ae2 Reland: 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.

This relands https://r.android.com/1205729.

Bug: 145934348
Test: m
Change-Id: I039d6e204bee5ddc16d8e2d85057fbec20e326fe
2020-02-13 17:21:13 +00:00
Ulyana Trafimovich
394b9b379a Merge "Use precise class loader context for system server jars." 2020-02-13 17:13:13 +00:00
Automerger Merge Worker
ad6e56e993 Merge "Bump our macOS target version to 10.9." am: 3375433ed2
Change-Id: I97d5130e4ab3b455639347f0f4a58b748991a0fc
2020-02-13 16:14:16 +00:00
Elliott Hughes
3375433ed2 Merge "Bump our macOS target version to 10.9." 2020-02-13 16:02:19 +00:00
Ulya Trafimovich
f3ff010bd4 Use precise class loader context for system server jars.
This patch excludes non-Soong system server jars from dexpreopting.

System server jars should be dexpreopted together for better
performance: each jar should have all preceding system server jars
in its class loader context (that is passed to dex2oat and recorded
in the resulting .oat file to be used by the loader).

This means that we need a total order on system server jars. The
default order provided by PRODUCT_SYSTEM_SERVER_JARS is not good, as
it does not always respect genuine dependencies between jars (counter-
examples are rare, but non-trivial to fix: b/148219586).

This patch adds a post deps mutator pass that creates additional
dependencies and enforces global order. These are later used to
generate precise class loader contexts and system server classpath.

Test: Class loader contexts in the oat files for system server jars
  match expectations:

  $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/com.android.location.provider.odex | grep '^classpath'
  classpath = PCL[]
  $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/services.odex | grep '^classpath'
  classpath = PCL[/system/framework/com.android.location.provider.jar*1919890654]
  $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/wifi-service.odex | grep '^classpath'
  classpath = PCL[/system/framework/com.android.location.provider.jar*1919890654:/system/framework/services.jar*4269704903:/system/framework/services.jar!classes2.dex*134345935]
  ...

Test: The phone boots and logcat has no scary messages related to
  class loader contexts:

  $ lunch aosp_walleye-userdebug && m
  $ adb reboot bootloader && fastboot flashall -w && adb wait-for-device
  $ adb root
  $ adb shell stop
  $ adb logcat -c
  $ adb shell setprop dalvik.vm.extra-opts -verbose:oat
  $ adb shell start
  $ adb logcat | egrep -i 'system_server: .*load.*/system/framework'
  02-03 14:14:26.912  5016  5016 I system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
  02-03 14:14:26.914  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
  02-03 14:14:26.914  5016  5016 I system_server: Loading /system/framework/oat/arm64/services.odex with executable: 1
  02-03 14:14:26.916  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 1
  02-03 14:14:26.927  5016  5016 I system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 1
  02-03 14:14:26.933  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 1
  02-03 14:14:26.933  5016  5016 I system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 1
  02-03 14:14:26.934  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 1
  02-03 14:14:26.946  5016  5016 I system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0
  02-03 14:14:26.947  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0
  02-03 14:14:26.947  5016  5016 I system_server: Loading /system/framework/oat/arm64/services.odex with executable: 0
  02-03 14:14:26.948  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 0
  02-03 14:14:26.948  5016  5016 I system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 0
  02-03 14:14:26.948  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 0
  02-03 14:14:26.949  5016  5016 I system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 0
  02-03 14:14:26.949  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 0
  02-03 14:14:30.480  5016  5016 I system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
  02-03 14:14:30.481  5016  5016 I system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1

Bug: 141785760
Bug: 140451054
Bug: 148944771

Change-Id: Idac678dbd1f5fe0e381ce8e0e3561423f8a31389
2020-02-13 14:39:03 +00:00
Automerger Merge Worker
cc153a6a57 Merge "Make PRODUCT_BOOT_JARS and PRODUCT_UPDATABLE_BOOT_JARS disjoint." am: cc9a5edd4f
Change-Id: Icdf33fa16a312eff7a1c71f17ebaa4ba23bffc97
2020-02-13 13:48:33 +00:00
Ulyana Trafimovich
cc9a5edd4f Merge "Make PRODUCT_BOOT_JARS and PRODUCT_UPDATABLE_BOOT_JARS disjoint." 2020-02-13 13:36:25 +00:00
Ulya Trafimovich
4cdada2d1f Make PRODUCT_BOOT_JARS and PRODUCT_UPDATABLE_BOOT_JARS disjoint.
This is to unify boot jars with system server jars:
PRODUCT_SYSTEM_SERVER_JARS and PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS
do not overlap.

Test: aosp_walleye-userdebug boots

Exempt-From-Owner-Approval: cherry-pick.
Bug: 146363577
Change-Id: If001049a46f8e9d38921dabeedbd61e971ebfe73
Merged-In: If001049a46f8e9d38921dabeedbd61e971ebfe73
(cherry picked from commit ef4358e536)
2020-02-13 13:35:39 +00:00
Automerger Merge Worker
7dbfe9a852 Merge "Add vendor snapshot modules" am: f048446f92
Change-Id: I28f589f50c4305a6287a88916e522401f618afb8
2020-02-13 11:17:01 +00:00
Treehugger Robot
f048446f92 Merge "Add vendor snapshot modules" 2020-02-13 11:01:10 +00:00
Automerger Merge Worker
6a22b910e5 Merge "Disable PGO profile use in Clang-based coverage builds" am: 64a075c789
Change-Id: I1a10630ef67e457b0539b519e829aab7f95bc924
2020-02-13 07:02:08 +00:00
Treehugger Robot
64a075c789 Merge "Disable PGO profile use in Clang-based coverage builds" 2020-02-13 06:51:21 +00:00
Automerger Merge Worker
8aac3e3c0d Update apex.go to remove libutils am: 9401b187f8
Change-Id: I72a201f0e0dc78f0d5876ffd2a2cd5e3d2df56d7
2020-02-13 06:20:55 +00:00
Elliott Hughes
632dbb3dc2 Bump our macOS target version to 10.9.
https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues
says "notarization only works for binaries linked against macOS 10.9
or later".

Test: N/A
Bug: http://b/143105198
Change-Id: If66f81caa2f074bf70a75094da578295aa9f58ad
2020-02-12 18:31:35 -08:00
Jeffrey Huang
9401b187f8 Update apex.go to remove libutils
Bug: 145922701
Test: m -j
Change-Id: I13078f43129a7a9478b9bb97bb94c2c70fdb148c
2020-02-12 17:35:59 -08:00
Pirama Arumuga Nainar
807d49bc43 Disable PGO profile use in Clang-based coverage builds
Bug: http://b/143977934

Clang errors that -fprofile-use and -fprofile-instr-generate are
incompatible.

Test: m CLANG_COVERAGE=true COVERAGE_PATHS="*" on cf_x86_phone target
Change-Id: I584b615639fcef86668b7fa34b7511b4820d9548
2020-02-12 15:12:07 -08:00
Chih-Hung Hsieh
9d9555e348 Switch from clang-r370808b to clang-r377782
Allow new clang compiler warnings until they are
fixed or suppressed in all branches.

Bug: 145916209
Test: make checkbuild
Change-Id: Ic873b8d705dacd0d92f9031b3960e01283090363
2020-02-12 21:50:07 +00:00
Automerger Merge Worker
cf6fc983ae Merge "Improve documentation of the enabled property" am: 6a20b179d2
Change-Id: Id6065ec725fd9bbb9c5e4204264fa2c2e8b640e0
2020-02-12 21:12:16 +00:00
Treehugger Robot
6a20b179d2 Merge "Improve documentation of the enabled property" 2020-02-12 21:08:32 +00:00
Automerger Merge Worker
0c8e8c2cf3 Merge "Update the doc about apex_available" am: 6eb0da1530
Change-Id: I061fad849d672ef1f175c58dfc202378ff019581
2020-02-12 21:06:49 +00:00
Treehugger Robot
6eb0da1530 Merge "Update the doc about apex_available" 2020-02-12 20:58:24 +00:00
Jiyong Park
9a1e14ef6c Update the doc about apex_available
The default has changed.

Exempt-From-Owner-Approval: documentation change

Bug: 128708192
Bug: 149393721
Test: n/a
Change-Id: I91f36fc1fb5f2302deac8ee23bb847077b1281c9
2020-02-12 20:58:08 +00:00
David Zeuthen
b71fe84c64 Port IdentityCredential HAL to AIDL.
Bug: 111446262
Test: atest android.security.identity.cts
Test: VtsHalIdentityTargetTest
Test: android.hardware.identity-support-lib-test
Change-Id: Ibd5403f52e2d59237e77757c3f334c13b26f3d9d
2020-02-12 10:05:03 -05:00
Paul Duffin
54d9bb70d0 Improve documentation of the enabled property
Makes it clear that disabling a module is something that should be
avoided if possible.

Test: m soong_docs
Change-Id: Ief11e705f049edfd53b2af66bdf753f24d32aa71
2020-02-12 10:28:40 +00:00
Jiyong Park
f760cae41b apexDepsMutator is a top-down mutator
apex { name: ["myapex"], native_shared_libs: ["libX", "libY"] }
cc_library { name: "libX", shared_libs: ["libY"] }
cc_library { name: "libY", shared_libs: ["libZ"], stubs: {...} }

apexDepsMutator was a bottom up mutator and it uses WalkDeps to traverse
the dependency tree rooted at myapex in a depth-first order. While
traversing the tree, if calls BuildForApex for a module that will be
part of the APEX.

libY is visited twice. Once via libX and once via myapex. If the visit
from libX was before the visit from myapex (since this is a depth-first
traversing), BuildForApex is not called for libY and its dependency
libZ, because libY provides a stub. And then when libY is again visited
via myapex, BuildForApex is correctly called for the module, but not for
its dependencies libZ because the paths from libY to libZ was already
visited.

As a result, the apex variant of libY has a dependency to the non-apex
variant of libZ.

Fixing the problem by changing the mutator a top-down one.

Bug: 148645937
Test: m
Change-Id: Ib2cb28852087c63a568b3fd036504e9261cf0782
2020-02-12 17:01:26 +09:00
Automerger Merge Worker
ee239878f4 Merge "Update apex dependency even for test and non-installable APEXes" am: 4e29184a4e
Change-Id: I6c61b9a816c98bc878a394c612fc99d26acbb612
2020-02-12 07:52:58 +00:00
Treehugger Robot
4e29184a4e Merge "Update apex dependency even for test and non-installable APEXes" 2020-02-12 07:45:47 +00:00
Automerger Merge Worker
8a7f0e94c1 Merge "Automatically set compile_dex:true and hostdex:true for APEX variants" am: 6655756230
Change-Id: Ic54a14c775d39486930bc356f84c2bd6073d9f0c
2020-02-12 05:49:14 +00:00
Treehugger Robot
6655756230 Merge "Automatically set compile_dex:true and hostdex:true for APEX variants" 2020-02-12 05:35:25 +00:00
Automerger Merge Worker
233c3d4978 Merge "java_sdk_library - replace .docs suffix with .stubs.source" am: 19d84a0f3e
Change-Id: Ifdc36ce678d34a73cd88ac89d31b39f74ed33de3
2020-02-12 02:43:27 +00:00
Treehugger Robot
19d84a0f3e Merge "java_sdk_library - replace .docs suffix with .stubs.source" 2020-02-12 02:29:35 +00:00
Jiyong Park
6b21c7d2ab Automatically set compile_dex:true and hostdex:true for APEX variants
... unless they are turned off explicitly.

Bug: 147221965
Test: m
Change-Id: I6b91d6409d9cf06ad09467c53d5d51a9c693256e
2020-02-12 10:47:36 +09:00
Automerger Merge Worker
39b51a899f Merge "<apex_name>-deps-info correctly tracks dependencies" am: 2bb26d3fad
Change-Id: Ibc9b5c619373c1698fa1cb90129d5da45bb5407b
2020-02-12 00:49:07 +00:00
Automerger Merge Worker
00f3bf9e7e Merge "m <module_name> builds <module_name>.<apex_name>" am: 45f3c9b6a6
Change-Id: I30659368e9eb37d83e2f1ad45b43f3bd3c2d50f7
2020-02-12 00:48:42 +00:00
Jiyong Park
2bb26d3fad Merge "<apex_name>-deps-info correctly tracks dependencies" 2020-02-12 00:47:21 +00:00
Treehugger Robot
45f3c9b6a6 Merge "m <module_name> builds <module_name>.<apex_name>" 2020-02-12 00:35:55 +00:00
Automerger Merge Worker
b19df54d94 Merge "neverallow: update for different HIDL build." am: 226adf28ae
Change-Id: If94b76353b10f255f24ed274ead5bef34bbf387e
2020-02-11 23:24:24 +00:00
Steven Moreland
226adf28ae Merge "neverallow: update for different HIDL build." 2020-02-11 23:10:34 +00:00
Jiyong Park
ab872e0295 Update apex dependency even for test and non-installable APEXes
The apex dependency map wasn't updated for test or non-installable
APEXes to work around the problem that a module being in such APEX
prevented the module from being installed in the system partition.

Since that problem is not happening any more, removing the unnecessary
work-around.

Bug: 123892969
Test: m
Change-Id: I43e07a9611a3e08ff39b9a64454b1c67949d35bc
2020-02-12 07:45:16 +09:00
Automerger Merge Worker
aa47e5748a Merge "Revert "Allow Linux hosts to use ubsan runtime sanitizers."" am: 2d743b54c7
Change-Id: I6f1999ff19f14b6599788a19f6c9462d97d445d6
2020-02-11 20:38:36 +00:00
Ivan Lozano
2d743b54c7 Merge "Revert "Allow Linux hosts to use ubsan runtime sanitizers."" 2020-02-11 20:23:36 +00:00
Ivan Lozano
9e37faa3ab Revert "Allow Linux hosts to use ubsan runtime sanitizers."
This reverts commit dbc5000c5b.

Reason for revert: Build breakage.

Change-Id: Ia6a1b58f156e4cc071562043c2f99f78b45b7968
Exempt-From-Owner-Approval: Reverting change due to build breakage.
2020-02-11 20:21:01 +00:00
Jiyong Park
aae9bd11c2 sdk_version: "system_server_current"
The new sdk version "system_server_current" is for system server
components that needs to use all public APIs, system APIs, module APIs,
and the system server APIs.

Bug: 146757305
Test: m
Change-Id: I24fd5af010532a110393676607dc90889f2ec17e
2020-02-12 04:36:43 +09:00
Automerger Merge Worker
897d8b2612 Merge "rm libbinderthreadstate" am: 7072100760
Change-Id: Ib89924ec8cde456e6a3360c86c95b949938f96c5
2020-02-11 18:48:18 +00:00
Steven Moreland
7072100760 Merge "rm libbinderthreadstate" 2020-02-11 18:45:39 +00:00
Automerger Merge Worker
3121be5eae Merge "Allow Linux hosts to use ubsan runtime sanitizers." am: 0dbb324a83
Change-Id: Ia115d2740a3d7f6a5d082fb52ed50edb9836359e
2020-02-11 18:44:59 +00:00
Ivan Lozano
0dbb324a83 Merge "Allow Linux hosts to use ubsan runtime sanitizers." 2020-02-11 18:37:17 +00:00
Paul Duffin
91b883d541 java_sdk_library - replace .docs suffix with .stubs.source
Previously, the .docs suffix was used for droidstubs internal modules
that generate the stubs source. The name was confusing so this change
replaces the suffix with .stubs.source to clarify the purpose of those
modules.

Bug: 148080325
Test: m droid
Change-Id: I9d7a2ab19e4a331b515408912ac8f7e8b0e1b35d
2020-02-11 13:11:28 +00:00
Automerger Merge Worker
e0d6f7d9d3 Merge "Document apex and apex_test" am: a871ee2067
Change-Id: If96e254184f5b494eab775d29f234a2ab7740fdb
2020-02-11 03:12:35 +00:00