Commit graph

350 commits

Author SHA1 Message Date
Jaewoong Jung
f2200adccb Add and update comments in env and android_env.go
Bug: 173450116
Test: m nothing
Change-Id: I582a483d11c2ca23fd6e9597e49cdfb7e69152de
2020-11-16 16:01:27 -08:00
Treehugger Robot
ceed6be00d Merge "Pass Config to NewTestContext instead of ctx.Register" 2020-11-14 05:58:58 +00:00
Patrice Arruda
0c1c456643 Define UseBazel in Config
The UseBazel() function will be used in several places to perform
different functionality such as setting up the metrics path.

Bug: b/173028918
Test: m nothing
Change-Id: Ie94073b8f0552ec7528e1cc2f3be74b693dc3135
2020-11-13 11:16:21 -08:00
Chris Parsons
3060ec7731 Stop first pass of mixed bazel builds before writing ninja
This shaves off ~20s, which is ~11%, of `m nothing` with mixed builds.

Test: Manual verification with mixed builds of aosp_flame.
Change-Id: Ief1bc56c92329e899c829fc1374eea9ee9b94fb7
2020-11-12 22:30:46 +00:00
Colin Cross
ae8600b507 Pass Config to NewTestContext instead of ctx.Register
Prepare for using Config when adding singletons by passing
Config to NewTestContext and NewContext instead of to ctx.Register.
This will enable a followup change to store SingletonMakeVarsProviders
registered on the Context in the Config, which is necessary to run
multiple tests in parallel without data races.

Test: all soong tests
Change-Id: Id229629a4e42ff4487d317241673837726c075fc
2020-11-12 10:07:49 -08:00
Jingwen Chen
50f93d2078 Rename bazel overlay to queryview.
Bazel overlay is an experimental feature. This renames the feature to 'queryview' to better describe its purpose, and also move away from the already overloaded 'overlay' term in Android.

Test: m queryview && bazel query --package_path=out/soong/queryview //...
Change-Id: I8b5068c7db46cb61a03a8e87af9c7c9077ebeff9
2020-11-05 19:17:14 -05:00
Jingwen Chen
222ff4d186 bazel overlay: fix regression to "list of string" bpdocs type.
A recent change to Blueprint [1] added the feature to infer the type of
list elements to more than just "list of strings", but this also changed
the text to "list of string" (without s). This CL fixes the bazel
overlay, which uses "list of strings".

Test: m bazel_overlay && bazel query //...  --package_path=out/soong/bazel_overlay

[1]: 764a771917%5E%21/#F1

Change-Id: I7522d15b1ce751807e1881ce1e94f068d226b316
2020-11-05 03:55:20 -05:00
Treehugger Robot
d3e294d8ac Merge "Add --skip-soong-tests argument to soong_ui and use it in multiproduct_kati" 2020-11-02 21:31:31 +00:00
Colin Cross
00a8a3f746 Add --skip-soong-tests argument to soong_ui and use it in multiproduct_kati
There is no need for multiproduct_kati to run the tests for
every product, they don't vary by product config. --skip-soong-tests
can also be used for local development to run soong_build even if
the tests don't pass.

Bug: 156428456
Test: m --skip-soong-tests nothing
Change-Id: I9c00e3d1b6e51d17bb290339c3f124d4d1c9e69f
2020-10-29 14:22:04 -07:00
Patrice Arruda
e92c30dff1 Capture the build command that executed the build system.
We need to capture the user build command to understand what additional
arguments is passed in to Soong. This data is useful to know which
targets are being executed and have statistics on top build targets
are specified.

Bug: b/169453712
Test: ran "m blueprint_tools", "m nothing", "lunch 1" and checked
      in soong_metrics proto.
Change-Id: I7ab94dcf037211f1abffe6afd012b03ffbf99756
2020-10-29 11:01:32 -07:00
Rupert Shuttleworth
680387bf1d Add code to enable USE_BAZEL=1 m functionality in AOSP.
Test: Manually, but builds currently fail due to a recent change to bazel_handler.go.
Change-Id: I9a45a2c73d1755032b11f6b913c03f83a28f63c5
2020-10-26 09:23:24 +00:00
Jingwen Chen
311bd38082 Bazel overlay: write all .bzl files in <bazel_overlay>/build/bazel/overlay_rules directory
This keeps the top level directory clean, and leverages the
new "build/bazel" repo location / package path.

Test: m bazel_overlay && cd out/soong/bazel_overlay && bazel cquery //...

Bug: 171180724

Fixes: 171180724
Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: I151b8f3d2177167711e5974e5eabad8d6e910276
2020-10-19 07:59:46 -04:00
Liz Kammer
0e7993e3d2 Clarify error for soong_ui failing to parse args
Test: m soong_ui and give invalid command line args
Change-Id: I7b4479b392d953bd1d87218184c5ed2143568a07
2020-10-15 11:07:13 -07:00
Jingwen Chen
6874dbe104 Stop hardcoding sdk/module_exports dynamic prop types for Bazel overlay.
These sdk/sdk_snapshot/module_exports/module_exports_snapshot properties
are dynamically created using RegisterSdkMemberType [1] and eventually
createDynamicSdkMemberType [2]. All dynamically created sdk member types
are string list types.

Instead of hardcoding the mapping, retrieve them from the registry
instead.

[1]: https://cs.android.com/android/platform/superproject/+/master:build/soong/android/sdk.go;l=489-497;drc=master
[2]: https://cs.android.com/android/platform/superproject/+/master:build/soong/sdk/sdk.go;l=156;drc=master

Bug: 166563303
Bug: 170798271
Fixes: 170798271

Test: m bazel_overlay && cd out/soong/bazel_overlay && bazel cquery //...
Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: Ib77f4e0cc14a7b4ec344a2de115682c234927c16
2020-10-14 04:55:00 -04:00
Treehugger Robot
f43eee4b9b Merge "Add warning about out-directory usage with RBE builds" 2020-10-12 15:25:22 +00:00
Colin Cross
405af07859 Revert "Make lots of tests run in parallel"
This reverts commit 323dc60712.

Reason for revert: Possible cause of test instability
Bug: 170513220
Test: soong tests

Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-09 18:34:24 -07:00
Christopher Parsons
c8f84809ad Merge "Mixed bazel/soong build prototype for genrule" 2020-10-09 14:27:04 +00:00
Chris Parsons
f3c96efea4 Mixed bazel/soong build prototype for genrule
With this change, bazel_module is a specifiable property on
genrule module definitions. With bazel-enabled mode, soong_build will
defer to Bazel for information on these modules.

source build/soong/bazelenv.sh to enter bazel-enabled mode.

Test: Manually verified on bionic/libc genrules using aosp_cf_x86_phone-userdebug
Change-Id: I3619848186d50be7273a5eba31c79989b981d408
2020-10-08 22:46:23 -04:00
Kousik Kumar
a0a44a84be Add warning about out-directory usage with RBE builds
Prints the following warning messsage:
WARNING:
Setting OUT_DIR to a path other than out may result in slow RBE builds.
See http://go/android_rbe_out_dir for a workaround.

Bug: b/169676232
Change-Id: Id1ad06c4dc672c24373642e0b624833eb6a0dbcf
2020-10-08 02:50:24 -04:00
Colin Cross
323dc60712 Make lots of tests run in parallel
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.

Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-10-06 15:12:22 -07:00
Kousik Kumar
ec47864ca0 Deprecate USE_GOMA and replace with FORCE_USE_GOMA
Bug: b/163361527
Test: Ran builds with USE_GOMA / FORCE_USE_GOMA flags
Change-Id: I67b229fbf52e913b0c4f5e7932021132ddc0598f
2020-09-21 15:35:57 -04:00
Jingwen Chen
d8004efff2 Generate .bzl rule definitions for every module type in Soong, and
surface module properties as attributes.

This CL maps int, bool, string and string_list module props from Soong
modules into their respective Bazel targets.

With this CL, you can now query modules based on their properties. For
example:

$ bazel query 'attr(nocrt, 1, //...)'
$ bazel query 'attr(apex_available, //apex_available:platform, //...)'
$ bazel query //art/dalvikvm:dalvikvm--linux_glibc_x86_64 --output=build | grep compile_multilib

Test: m bazel_overlay && cd out/soong/bazel_overlay && bazel cquery 'attr(apex_available, com.android.runtime, //...)'

Test: soong_build tests

Fixes: 162720644
Fixes: 164320355
Change-Id: Iea8e594b952feccac3281f36dd6bdee8e7d62c3a
2020-09-09 09:51:45 +00:00
Jingwen Chen
ce3d46fe05 Bazel overlay: rename 'deps' to 'module_deps'.
'deps' is a module prop used by some module types, like
prebuilt_build_tool:

https://cs.android.com/android/platform/superproject/+/master:build/soong/android/prebuilt_build_tool.go;l=25-26;drc=751ae87ed29c67629f068a8590af80023a457294

Use `module_deps` to prevent conflicts in the generated overlay
attributes.

Bug: 162720644
Test: m bazel_overlay && cd out/soong/bazel_overlay && bazel cquery
//...
Test: soong_build tests

Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: Ia075a860983960b2d9121d30ead8f808be7e0c5b
2020-08-25 06:11:53 +00:00
Jingwen Chen
81a0b66d93 Merge "Surface module properties as Bazel BUILD target attributes in the Bazel overlay" 2020-08-24 22:59:11 +00:00
Jingwen Chen
69d4cbeb04 Surface module properties as Bazel BUILD target attributes in the Bazel overlay
This patchset changes bazel_overlay to generate soong_module as a macro,
instead of a rule, and generate module properties in the BUILD files as
kwargs to the soong_module macro.

Here's a sample of the new BUILD files with module properties:

bionic/libdl/BUILD.bazel:
https://paste.googleplex.com/6484466996346880?raw

art/build/apex/BUILD.bazel:
https://paste.googleplex.com/5461276001042432?raw

bionic/apex/BUILD.bazel:
https://paste.googleplex.com/4932795173437440?raw

soong_module is now a macro that conditionally expands to underlying
soong_<module type> rules with statically defined attributes. In this
CL, we are starting with a hardcoded filegroup rule definition to
demonstrate the conditional rule loading within the soong_module macro.
If the module_type matches an existing Bazel rule, soong_module forwards
the entire **kwargs into the rule, which Bazel typechecks.

Non-filegroup module types will be expanded into generic_soong_module,
but with the kwargs dropped.

This approach allows us to:

1) Programmtically generate soong_<module type> rules for all module
types available in Soong, together with the statically defined attribute
types in `attrs`.
2) Incrementally migrate and test individual module types from
generic_soong_module to their module rule shims.
3) Swap out the module rule shims to the actual Bazel rules (e.g
cc_library, java_library) and perform attribute manipulation in Starlark
itself.

Example of querying against the 'srcs' attribute in soong_filegroup:

```
$ bazel cquery 'kind(soong_filegroup, //...)' | wc -l
590

$ bazel cquery --output=build 'attr(srcs, "linker.cpp",
kind(soong_filegroup, //bionic/...))'
INFO: Analyzed 3907 targets (0 packages loaded, 0 targets configured).
INFO: Found 3907 targets...
/usr/local/google/home/jingwen/aosp/out/soong/bazel_overlay/bionic/linker/BUILD.bazel:4144:13
soong_filegroup(
  name = "linker_sources",
  generator_name = "linker_sources",
  generator_function = "soong_module",
  generator_location = "bionic/linker/BUILD.bazel:4144:13",
  srcs = ["dlfcn.cpp", "linker.cpp", "linker_block_allocator.cpp",
"linker_dlwarning.cpp", "linker_cfi.cpp", "linker_config.cpp",
"linker_debug.cpp", "linker_gdb_support.cpp", "linker_globals.cpp",
"linker_libc_support.c", "linker_libcxx_support.cpp",
"linker_namespaces.cpp", "linker_logger.cpp",
"linker_mapped_file_fragment.cpp", "linker_phdr.cpp",
"linker_relocate.cpp", "linker_sdk_versions.cpp", "linker_soinfo.cpp",
"linker_tls.cpp", "linker_utils.cpp", "rt.cpp"],
  deps = [],
)
/usr/local/google/home/jingwen/aosp/out/soong/bazel_overlay/soong_module.bzl:32:23
in <toplevel>
```

This CL is known to be lacking the following features, and will be looked at in follow up CLs:

1) Pretty printing reflect.Interface properties, like arch, multilib and
dists.
2) Generating module Bazel rule shims for all module types, instead of
hardcoding them like `soong_filegroup`.

Bug: 162720644
Test: bazel_overlay_test.go (soong build test)
Test: m bazel_overlay && cd out/soong/bazel_overlay && bazel cquery //...
Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: Ic1e448887eb540ed15a55bc4090cf75a4d832d41
2020-08-21 11:45:46 +00:00
Ramy Medhat
f668917c25 Add Goma deprecation PSA to soong.
Test: build with Goma
Change-Id: Ie7e146285afd40bc0a1dc17a0b898960f57a118b
2020-08-18 17:29:48 -04:00
Jingwen Chen
5ba7e479d1 Create a AOSP Bazel overlay workspace with Soong
The Bazel overlay is a directory at out/soong/bazel_overlay that
replicates the layout of the AOSP Soong module tree, but as a Bazel
workspace. Each Soong module variant is represented as a BUILD target
created with the `soong_module` rule.

To create this overlay, run `m bazel_overlay`.

A `soong_module` target can depend on other `soong_module` targets.
These dependencies replicate each module's `directDeps` in the Blueprint
graph, just before `PrepareBuildActions`.

This enables users to use bazel query as a way to introspect the Soong
module graph. For example,

- Direct reverse dependencies of //bionic/libc:generated_android_ids in
//bionic/libc/...:

$ bazel query 'rdeps(//bionic/libc/...,
//bionic/libc:generated_android_ids, 1)'
//bionic/libc:libc_bionic_ndk--android_recovery_arm_armv7-a-neon_static
//bionic/libc:libc_bionic_ndk--android_ramdisk_arm_armv7-a-neon_static
//bionic/libc:libc_bionic_ndk--android_arm_armv7-a-neon_static_com.android.runtime
//bionic/libc:libc_bionic_ndk--android_arm_armv7-a-neon_static
//bionic/libc:generated_android_ids

- Why does com.android.runtime depend on lzma?

$ bazel query
'somepath(//bionic/apex:com.android.runtime--android_common_com.android.runtime_image,
//external/lzma/...)'
//bionic/apex:com.android.runtime--android_common_com.android.runtime_image
//bionic/libc/malloc_debug:libc_malloc_debug--android_arm_armv7-a-neon_shared_com.android.runtime
//system/core/libunwindstack:libunwindstack--android_arm_armv7-a-neon_shared_com.android.runtime
//external/lzma/C:liblzma--android_arm_armv7-a-neon_shared_com.android.runtime

- What does the dep graph of //bionic/libc:crtbegin_so look like?

$ bazel query
'deps(//bionic/libc:crtbegin_so--android_arm_armv7-a-neon)'
--output=graph > graph.in && dot -Tpng < graph.in > graph.png

https://photos.app.goo.gl/DfsdoFRNsRjGwTmy8

Test:  croot && m bazel_overlay && cd out/soong/bazel_overlay && bazel
query //... && bazel query 'rdeps(//bionic/libc/...,
//bionic/libc:generated_android_ids, 1)'

Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: I3bf40309bfb2d963bb8a688706385a57ee304c37#
2020-08-06 10:24:21 +00:00
Patrice Arruda
09ef4dc2f7 Update language to comply with inclusive guidance
See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: m diff_target_files
Change-Id: I5654ccc5ba9be8cff01689b952d2feaade19ae79
2020-07-31 16:50:52 +00:00
Treehugger Robot
0413d0aa97 Merge "Update language to comply with inclusive guidance" 2020-07-30 18:35:47 +00:00
Patrice Arruda
8da724a64a Update language to comply with inclusive guidance
See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: m nothing
Change-Id: Ib54185f2ef9666c7d82afc65fe7fc6bc7fdadfb5
2020-07-28 21:22:12 +00:00
Patrice Arruda
f445ba1788 Inclusive fix: renaming dumb terminal to simple terminal.
Bug: b/161896447
Test: "lunch 1" and "m nothing"
Change-Id: Ifb228c0f0f634477932c9240e57170f7390201f7
2020-07-28 20:25:03 +00:00
Patrice Arruda
73c790f59e Use the build start time from Soong main UI for metrics build timestamp.
Currently, the build timestamp saved to the build_date_timestamp
field in the MetricsBase metrics protobuf usually comes from a text
file named build_date.txt. It may not be accurate for metrics purposes.
Instead, use the build start time from Soong main UI for a better
timestamp.

Bug: b/140638454
Test: Ran and checked the build_date_timestamp by running the printproto
      command.
Change-Id: I4d893fbbf9830ba21911e56ae13bc5272be47ae6
2020-07-14 17:23:23 +00:00
Patrice Arruda
62f1bf2378 Add RBE metrics dump in Soong UI.
From aosp/1329396, the RBE metrics protobuf file is part of the
metrics uploading process. The RBE metrics protobuf file is
generated by running the bootstrap shutdown command. A new function
named DumpRBEMetrics was written in order to generate the RBE metrics
protobuf file before sending to the uploading process.

Bug: b/140638454
Test: * Unit test cases
      * Ran RBE build on my local host and verified the
        metrics protobuf file is created.
      * Ran non-RBE build after RBE build and verified that
        the previous metrics protobuf file was deleted.

Change-Id: I4b8068905cb67c4b8c2d94793917b98974fed707
2020-07-09 21:06:22 +00:00
Liz Kammer
a93fbacdbe Correct typo of defaults for docs property sorting
Test: manual
Change-Id: Iaca7ba51ca658529dacd2a324412964b2732c4b4
2020-07-07 13:47:29 -07:00
Christopher Parsons
0eeff82c98 Merge "Add missing soong_docs inputs" 2020-07-06 22:34:51 +00:00
Jaewoong Jung
11c1e0f94d Output apkcerts file for android_app_set.
Soong and Make have no ways to figure out what splits will be outputted
from a given android_app_set, so it's impossible for them to provide
full PACKAGES.$(LOCAL_MODULE).CERTIFICATE entries, which are required to
build a final apkcerts.txt. This change makes extract_apks produce
apkcerts.txt files for each input modules instead. The Make-side
counterpart of this change merges all local apkcerts.txt into a final
one.

Fixes: 160119159
Test: main_test.go
Test: m apkcerts-list
Merged-In: I321e80fd636a955213761f56a3ac64bfe7f7f7c0
Change-Id: I321e80fd636a955213761f56a3ac64bfe7f7f7c0
2020-07-01 10:03:09 -07:00
Thiébaud Weksteen
5e291c238f Fix bpfmt issues and add bpfmt to preupload checks
Test: m nothing
Change-Id: I10526a33685335bdd26cc7692815133379d4e0f6
2020-06-29 09:14:08 +02:00
Chris Parsons
8f232a2702 Add missing soong_docs inputs
Specifically, make Android.bp.list and soong.variables explicit inputs

While this is not a comprehensive list of all inputs
of this action (as the action depends on all blueprint
files in the source tree), this is closer to the truth.

This is a rollforward CL, which was originally rolled
back, as path validation failed for when OUT_DIR was
an absolute path. Validation has now been relaxed.

Test: Manually verified ninja output, checkbuild approved validation
  for aosp-crosshatch, and manually ran frameworks/rs/build_rs.py with
  patch fix
Change-Id: I4eb0d517f57336dd54eaa4bd31f46df9e93e6da2
2020-06-26 10:36:18 -04:00
Christopher Parsons
cd767eefe5 Revert "Add Android.bp.list and soong.variables to inputs for soong_docs action"
This reverts commit 67eee7cae4.

Reason for revert: Broke renderscript build

Change-Id: Ie26b3c7a78afe44d719f399520e643174109593f
2020-06-18 21:49:48 +00:00
Chris Parsons
67eee7cae4 Add Android.bp.list and soong.variables to inputs for soong_docs action
While this is not a comprehensive list of all inputs of this action (as the action
depends on all blueprint files in the source tree), this closer to the truth.

Test: Manually verified ninja output, checkbuild approved validation for aosp-crosshatch
Change-Id: I77a0f612afb025232bee7d3ac31257b808991829
2020-06-18 12:06:37 -04:00
Patrice Arruda
7cc2074885 Run the metrics uploader in the background.
The metrics uploader was currently running on foreground where it
would copy the metrics files in a separate directory and then forked
into the background for the upload process. As a result, running the
lunch command would take a second longer to run since each metrics
uploader run had an average of half a second.

Bug: 140638454
Test: * Wrote and updated unit test cases.
      * Set ANDROID_ENABLE_METRICS_UPLOAD to point to the latest
        metrics_uploader bash script. Executed the "lunch 1" command
	and measured the running time. Executed "m nothing" command
	and checked that the metrics were uploaded.
      * Ran "lunch 1" and "m nothing" with
        ANDROID_ENABLE_METRICS_UPLOAD=""
      * Removed oauth from metrics_uploader and ran "m nothing" and
        "lunch 1". The oauth Message appeared only to "m nothing"

Change-Id: I13c61e666c8f44613dee291a704cef6a27335188
2020-06-13 00:34:37 +00:00
Treehugger Robot
039b04f4fc Merge "Upload build metrics after a build is completed." 2020-06-01 20:44:54 +00:00
Patrice Arruda
219eef3878 Upload build metrics after a build is completed.
Soong now supports the ability to upload metrics to another location
by setting the ANDROID_ENABLE_METRICS_UPLOAD to an uploader that
accepts the upload.proto proto buffer message. When the environment
variable is set, a set of build metrics files (soong_metrics,
rbe_metrics.pb and build_error) is uploaded.

Bug: 140638454
Test: * Wrote unit test cases
      * Setup the uploader, built a succcessful and failed aosp_arm-eng
        target and monitor the uploading of the metrics.
Change-Id: I76a65739c557dc90345e098ca03119a950ece2d2
2020-06-01 17:29:30 +00:00
Jooyung Han
9a37d4a602 Merge "pom2bp: add apex_available/min_sdk_version" 2020-05-28 09:09:59 +00:00
Martin Stjernholm
321bbe92b1 Explain checkLinker errors a bit more.
For an end user hitting these errors, the most likely reason is that
they have mixed up linker and crtbegin_dynamic.o from different builds
in their out tree.

Test: Build a linux_bionic executable in a tree exhibiting b/157549171.
Test: m nothing
Bug: 157549171
Change-Id: I64bee0848ed61226da6654caf3bafb51cf46d923
2020-05-27 21:31:42 +01:00
Lukács T. Berki
ad37304762 Merge "Call Delve using exec() instead of "dlv attach"." 2020-05-27 08:33:32 +00:00
Jooyung Han
43d3025cd5 pom2bp: add apex_available/min_sdk_version
apex_available/min_sdk_version are required to be available for mainline
modules(APK/APEX).

- java_import/java_library_static
- android_library/android_library_import

Bug: 156996905
Test: prebuilts/sdk/update_prebuilts.sh
Change-Id: I201ebabaa533c5ee19e394ab30ca2fa0e3d7ce0e
2020-05-27 00:37:45 +09:00
Sasha Smundak
827c55f502 Handle universal APK case in extract_apks
Cherrypick of ag/11553550

Bug: 157081961
Test: manual and builtin

Merged-In: I5ac64c845328a54024171da41c369050243462b0
Change-Id: I3ebc4a84501623774b78c9c19628994c1d71dc64
2020-05-20 13:10:59 -07:00
Lukacs T. Berki
a5e0f710c2 Call Delve using exec() instead of "dlv attach".
"dlv attach":

- Spams the terminal
- Requires sysctl -w kernel.yama.ptrace_scope=0
- Apparently, does not allow the debugger to inspect variables

Test: Manual.
Change-Id: I625369effaf5abda2b5d884c8ce5bde7247774eb
2020-05-18 09:50:18 +02:00
Jaewoong Jung
fa00c06187 Add apex_set module.
apex_set takes an .apks file that contains a set of prebuilt apexes with
different configurations. It uses extract_apks to select and install the
best matching one for the current target.

Bug: 153456259
Test: apex_test.go
Test: com.android.media.apks
Change-Id: I1da8bbcf1611b7c580a0cb225856cbd7029cc0a7
2020-05-15 11:02:01 -07:00