Commit graph

1265 commits

Author SHA1 Message Date
Treehugger Robot
b68036f44b Merge "Add LOCAL_LICENSE_KINDS to build/soong" 2021-02-10 07:18:29 +00:00
Paul Duffin
320e170675 Merge "Allow dex jars from prebuilt_apex to be used by hiddenapi" 2021-02-09 13:58:12 +00:00
Paul Duffin
b71a8de0d5 Merge "Refactor the hiddenAPI() method for reusability" 2021-02-09 13:57:52 +00:00
Treehugger Robot
d85d058820 Merge "Pass list of module libraries to gen_ndk_backed_by_apex.sh" 2021-02-09 03:21:36 +00:00
Colin Cross
69f0a24762 Pass list of module libraries to gen_ndk_backed_by_apex.sh
Running find on the entire module directory can lead to flaky failures
when a directory is modified by another rule while find is traversing
it.  Pass a list of libraries in the module into the script instead
of finding them on disk.

Fixes: 178509901
Test: TARGET_BUILD_APPS=com.android.runtime dist
Change-Id: Ie4bf288f0e3d99cbbed5ca8770687a9bbe5377e4
2021-02-08 16:52:07 -08:00
Paul Duffin
9d67ca6ab7 Allow dex jars from prebuilt_apex to be used by hiddenapi
Invokes hiddenAPIExtractInformation() on the dex jar provided by the
deapexer (on behalf of prebuilt_apex) so that hiddenAPI can extract the
information it needs, if anything, from the dex file (and accompanying
classes implementation file).

The dex file provided by deapexer has already had the hiddenapi
information encoded into it so it does not need to do that again.

This change adds the primary parameter to hiddenAPIExtractInformation()
and checks it (and also the hiddenAPI.active property) before it does
anything. That ensures that it behaves correctly when called directly
as well as when called from hiddenAPIExtractAndEncode().

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
      Also verified that the hiddenapi files created when using the
      prebuilts (using SOONG_CONFIG_art_module_source_build=false) are
      the same as when using the source. There is a slight difference
      in the order but otherwise identical.
Change-Id: I7abb63fd310bb94787ab7f4821e5fd283dc03046
2021-02-08 19:10:50 +00:00
Paul Duffin
4fd997bc13 Refactor the hiddenAPI() method for reusability
A follow up change needs to be able to contribute to the information
the hiddenapi process collates without having a dex file encoded. This
change pushes all the functionality related to information gathering
into the hiddenAPIGenerateCSV() method and then renames it and the
hiddenAPI() method to make it clearer what they do.

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: I04417720216a0fbadcd88e6185e7de6570af6216
2021-02-08 19:10:50 +00:00
Paul Duffin
5d0572b7eb Merge "Integrate hiddenapi processing into boot jars test" 2021-02-08 18:43:10 +00:00
Paul Duffin
1a75902832 Merge "Exclude exported_java_libs dependencies from visibility checks" 2021-02-08 18:40:46 +00:00
Paul Duffin
a7139425bc Exclude exported_java_libs dependencies from visibility checks
Test: m nothing
Change-Id: Iba45580c0711d48034898e9d42832c7e2b0e6284
2021-02-08 13:13:02 +00:00
Paul Duffin
f38931c287 Integrate hiddenapi processing into boot jars test
This change registers the hiddenapi singleton so that hiddenapi
processing is performed as part of
TestBootDexJarsFromSourcesAndPrebuilts so that additional hiddenapi
related tests can be added later.

The hiddenapi singleton uses the BootJars/UpdatableBootJars properties
from productVariables not the dexpreopt.GlobalConfig so this change
makes sure that they are consistent.

Performing hiddenapi processing causes the dex file used in "prebuilt
with source apex preferred" test to be encoded with hiddenapi
information which changes the path in the test.

Bug: 178361284
Test: m nothing
Change-Id: I2eb3d8cf11f6fb3bf4a34d6e4ae0c397c890191e
2021-02-07 10:58:24 +00:00
Paul Duffin
89886cbdb0 Ensure subtest failures are reported on subtest
A subtest (code inside the func passed to t.Run(...)) are passed their
own t *Testing pointer to use to report errors in order to ensure that
they are treated as errors of the subtest and not the containing test.

This change ensures that the subtests in the following tests use the
correct t *Testing.
* TestPrebuiltExportDexImplementationJars
* TestBootDexJarsFromSourcesAndPrebuilts

Bug: 178361284
Test: m nothing
Change-Id: I4e8b166051cb6098c89d8e68a450c81a714f7677
2021-02-07 10:58:24 +00:00
Bob Badour
02040de891 Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  android/Android.bp
  android/soongconfig/Android.bp
  androidmk/Android.bp
  apex/Android.bp
  bazel/Android.bp
  bp2build/Android.bp
  bpf/Android.bp
  bpfix/Android.bp
  cc/Android.bp
  cc/config/Android.bp
  cc/libbuildversion/Android.bp
  cc/libbuildversion/tests/Android.bp
  cc/ndk_api_coverage_parser/Android.bp
  cc/ndkstubgen/Android.bp
  cc/symbolfile/Android.bp
  cmd/dep_fixer/Android.bp
  cmd/diff_target_files/Android.bp
  cmd/extract_apks/Android.bp
  cmd/extract_jar_packages/Android.bp
  cmd/extract_linker/Android.bp
  cmd/fileslist/Android.bp
  cmd/host_bionic_inject/Android.bp
  cmd/javac_wrapper/Android.bp
  cmd/merge_zips/Android.bp
  cmd/multiproduct_kati/Android.bp
  cmd/path_interposer/Android.bp
  cmd/pom2bp/Android.bp
  cmd/pom2mk/Android.bp
  cmd/sbox/Android.bp
  cmd/soong_build/Android.bp
  cmd/soong_env/Android.bp
  cmd/soong_ui/Android.bp
  cmd/zip2zip/Android.bp
  cmd/zipsync/Android.bp
  cuj/Android.bp
  dexpreopt/Android.bp
  dexpreopt/dexpreopt_gen/Android.bp
  env/Android.bp
  etc/Android.bp
  filesystem/Android.bp
  finder/Android.bp
  finder/cmd/Android.bp
  genrule/Android.bp
  jar/Android.bp
  java/Android.bp
  java/config/Android.bp
  kernel/Android.bp
  linkerconfig/Android.bp
  linkerconfig/proto/Android.bp
  makedeps/Android.bp
  partner/Android.bp
  phony/Android.bp
  python/Android.bp
  python/tests/Android.bp
  remoteexec/Android.bp
  rust/Android.bp
  rust/config/Android.bp
  scripts/Android.bp
  sdk/Android.bp
  sh/Android.bp
  shared/Android.bp
  symbol_inject/Android.bp
  symbol_inject/cmd/Android.bp
  sysprop/Android.bp
  tradefed/Android.bp
  ui/build/Android.bp
  ui/logger/Android.bp
  ui/metrics/Android.bp
  ui/metrics/proc/Android.bp
  ui/status/Android.bp
  ui/terminal/Android.bp
  ui/tracer/Android.bp
  xml/Android.bp
  zip/Android.bp
  zip/cmd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  finder/fs/Android.bp
  third_party/zip/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-02-06 04:23:21 +00:00
Treehugger Robot
b02128ad0b Merge "Remove libbinder_headers from apex_available allowlist" 2021-02-06 03:20:47 +00:00
Jooyung Han
7701309889 Merge "cc: fix version macro for stubs" 2021-02-06 01:41:31 +00:00
Liz Kammer
b7eab01167 Merge "bp2build: convert paths/module refs to Bazel label" 2021-02-05 13:39:08 +00:00
Yan Yan
3a5c0af0fb Merge "Change IKE min_sdk to 30" 2021-02-05 07:33:56 +00:00
Jooyung Han
59d0931de7 Remove libbinder_headers from apex_available allowlist
libbinder_headers now sets apex_available property.

Bug: 150999716
Test: m
Change-Id: If58cfeafcc13fc36be8e44a66f2f472460fd4c8d
2021-02-05 15:32:40 +09:00
Treehugger Robot
87bd0f3c22 Merge "New header lib added to apex/allowed_deps.txt" 2021-02-05 03:34:48 +00:00
Jooyung Han
11b0fbdbf6 cc: fix version macro for stubs
When a cc module is built against a stub, compiler passes version macro
of the stub lib. Version macro should be numeric, so codenames or
"current" should be mapped to numbers just like how ndkstubgen maps to.

* "current" -> future (10000)
* codenames -> look up api_level.json
* otherwise -> cast to int

Bug: 179329813
Test: m / soong test / manually check the output build.ninja
Change-Id: Ic0e1dd904984e161694a0b77fad5559c06a4462f
2021-02-05 11:27:57 +09:00
Liz Kammer
356f7d45c1 bp2build: convert paths/module refs to Bazel label
This currently expands all globs, still need to support converting glob
syntax.

Test: go build_conversion_test
Test: GENERATE_BAZEL_FILES=true m nothing
Test: m nothing
Bug: 165114590
Change-Id: If7b26e8e663d17566fad9614ca87a8da1f095284
2021-02-04 13:45:56 -05:00
Jooyung Han
575b608683 New header lib added to apex/allowed_deps.txt
libbinder_headers_platform_shared is a new header lib shared between
libbinder/libbinder_ndk. Since it is re-exported via libbinder_headers,
it should be added to allowed_deps.txt as well.

Bug: 179020493
Test: m
Test: aidl_integration_test
Change-Id: I7fe89766c8e7924edf2a3ddd69c2876611d0dd0a
2021-02-04 11:30:49 +09:00
Yan Yan
4e9eef5702 Change IKE min_sdk to 30
This is generated by build/soong/scripts/update-apex-allowed-deps.sh

Bug: 177266501
Test: builds
Change-Id: Ie7d43501def9a72d019c886df1f379410ffb1527
2021-02-03 15:51:27 -08:00
Dario Freni
3627f8350d Add no_op binary.
Even if this binary is only used in a testing apex for dynamic common
library apex that will be removed once we have a production version
ready, we need said apex to be marked as updatable too.

Bug: 177879489
Bug: 179013728
Test: builds
Change-Id: I8ae519da164f1f5355d4c2dfeca88a497cda7990
(cherry picked from commit 0d3ff6d918)
2021-02-03 10:34:13 +00:00
Paul Duffin
5bbfef8718 Fix some minor issues with boot_image
Mistakenly used HostAndDeviceDefault (which builds host and device
variants by default) instead of HostAndDeviceSupported which only
builds a device variant by default.

Moved the test definitions of art and framework boot images from being
defined in all Java related tests into the test where they belong. This
is needed in order to improve the ART and framework boot image specific
testing.

Bug: 177892522
Test: m droid
Change-Id: I16771f09bd789033e18c58ae6dd4b6b9e865d831
2021-01-30 12:57:26 +00:00
Paul Duffin
a1d6025a49 Add boot_images to apex
Previously, the apex module had to hard code behavior specific to the
art apex module in order to include the art boot image. This change
adds support to the apex module to allow the boot images to be
specified per apex.

In combination with a change to add the "art-boot-image" to the ART
apex this allows the custom code for handling the art boot image in
apex to be removed.

That custom apex code also included the logic to ensure that the
GlobalSoongConfig was initialized for use by the dex_bootjars
singleton. That logic has been moved from the APEX to the boot_image
module. That ensures that it will be run if and only if a boot_image
module is present in the checked out repos. So, limited manifest
checkouts which do not contain the art or frameworks/base repos (which
is where the boot_image modules are defined) will not attempt to run
this logic, which would fail because dex2oat would not be present.

Bug: 177892522
Test: m droid
Change-Id: I02d25fbef6e864e31eb5e0f4eb50358c79486db0
2021-01-30 12:45:07 +00:00
Martin Stjernholm
c4e17317d1 Merge "Fix boot jar handling when both source and prebuilt APEXes and modules are present." 2021-01-29 13:15:02 +00:00
Nikita Ioffe
82aab58aea Turn apex compression from opt-out into opt-in
Compression is useful only for big enough apexes. We can manually opt-in
them, instead of trying to find list of apexes that should be opted-out.

Test: m
Bug: 178713634
Change-Id: Ice86fabb7c1db4a1e21e4c983d595cfd3a1c0b7a
2021-01-28 20:25:23 +00:00
Martin Stjernholm
1dc0d6d7f2 Fix boot jar handling when both source and prebuilt APEXes and modules
are present.

1) The boot jar to APEX mapping is maintained by the base names for
both of them. When building with prebuilt modules and APEXes, that
means we need to take care to compare them without regard to any
"prebuilt_" prefixes.

2) VisitAllModules can visit disabled modules and both source and
prebuilt modules, so they need some conditions to skip modules that
aren't applicable for boot jars.

Test: `m droid`
Test: `m droid SOONG_CONFIG_art_module_source_build=false`
  with fresh ART Module prebuilts in place
Bug: 171061220
Change-Id: Iced269d29127bc8b8f9b3171adb60a97d115628b
2021-01-28 20:09:24 +00:00
Paul Duffin
b9d731c8a9 Merge "Add boot_image module type" 2021-01-28 15:39:57 +00:00
Treehugger Robot
99afe0d442 Merge "apex: checks min_sdk_version for preview/current" 2021-01-28 13:04:52 +00:00
Paul Duffin
57eec1007e Merge "Make com.android.art related tests more realistic" 2021-01-27 10:03:42 +00:00
Treehugger Robot
fcf2da0b29 Merge "update apex allowed deps-2" 2021-01-27 01:06:48 +00:00
Jeongik Cha
40c6ae759d update apex allowed deps-2
an aidl module should specify its version. because of that some deps
which have version on its name is added.

Bug: 150578172
Test: m
Change-Id: If5c5d66e59f33ecf37d118b2b80db820ec78ea04
2021-01-26 23:05:42 +09:00
Paul Duffin
3451e1600f Add boot_image module type
Adds a boot_image module type. Follow on changes will add instances of
boot_image to represent the ART and framework boot images in the art
and frameworks/base repositories respectively.

For the moment they retrieve their associated boot image configuration
from the map returned by genBootImageConfigs() and leave the actual
work of creating the ninja rules to create the boot images to the
dex_bootjars singleton.

Bug: 177892522
Test: m droid
Change-Id: Ib69701de0d24d996bb8e8be7a20b941be907390e
2021-01-26 13:00:07 +00:00
Paul Duffin
d376f7925a Make com.android.art related tests more realistic
Previously, some tests used "com.android.art.something" as the name of
the APEX containing the ART boot jars but that is not the valid name
for an ART APEX. This change switches that to "com.android.art.debug".

Bug: 171061220
Test: m nothing
Change-Id: I057edc58ae81cdb14076a2d7d117ca1764aa3e52
2021-01-26 12:35:08 +00:00
Paul Duffin
092153de15 Fix problems with TestPrebuiltExportDexImplementationJars
Previously, the test mistakenly configured BootJars which meant the
test was testing not just the propagation of paths to files retrieved
from the prebuilt apex to the java_import module but also the process
of finding appropriate boot jars.

It also set "prefer: true" on the prebuilt_apex instead of the
java_import when checking to make sure that it still found the correct
module when both prebuilt and source were available and the prebuilt
was preferred.

Bug: 171061220
Test: m nothing
Change-Id: I4f2fa7ea372b14d4b169cdc78bdeb1ca4ac4dff8
2021-01-26 12:35:08 +00:00
Paul Duffin
4c183c7581 Merge "Make dexpreopt tools available for all java tests" 2021-01-26 12:08:30 +00:00
Jooyung Han
ed124c308f apex: checks min_sdk_version for preview/current
If we don't check "current", it won't be checked even in the finalized
branch.

If we don't check "preview", it should be done during the SDK
finalization. It'd be better done before the SDK finalization regarding
that setting min_sdk_version is to get approval from deps library owners.

Bug: 177833148
Test: m (soong tests)
Change-Id: I712b61cfe5a134fbb69c73956d26fb3a1e5c011e
2021-01-26 12:09:07 +09:00
Jeongik Cha
0056b99972 update apex allowed deps
an aidl module should specify its version. because of that some deps
which have version on its name is added.

Bug: 150578172
Test: m
Change-Id: I4fe33974190765615069d0ba894e5ab4dcc3064f
Merged-In: I4fe33974190765615069d0ba894e5ab4dcc3064f
2021-01-26 09:59:34 +09:00
Sophie Zheng
9b6596bb60 Merge "Revert "Revert "Automated NDK API coverage used by Mainline modules build integration.""" 2021-01-26 00:13:46 +00:00
sophiez
6bde0b5f9d Revert "Revert "Automated NDK API coverage used by Mainline modules build integration.""
This reverts commit 556b2ad77e.

Original change-id: Ib1b2f0dd2f9ae85b1545c6cc5bb4c5bbdfac1c15

Reason for revert: Add excutable permission to the gen_ndk_backedby_apex.sh.

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only

Change-Id: Ib587ba200cd7f2f61d478452b43c329d72b2de06
2021-01-25 19:52:10 +00:00
Paul Duffin
635aa0834f Make dexpreopt tools available for all java tests
Bug: 177892522
Test: m nothing
Change-Id: I594bddae692ef76dc8c3da504934d0151b13d4c9
2021-01-25 19:15:19 +00:00
Riddle Hsu
f17b07fc52 Merge "Revert "Automated NDK API coverage used by Mainline modules build integration."" 2021-01-25 06:15:29 +00:00
Riddle Hsu
556b2ad77e Revert "Automated NDK API coverage used by Mainline modules build integration."
This reverts commit 87ff51db84.

Reason for revert: build breakage b/178327796

Change-Id: I51c56938540794097eda579ebe47fa5c0a4d8c12
2021-01-25 01:44:34 +00:00
Sophie Zheng
0bf77198b5 Merge "Automated NDK API coverage used by Mainline modules build integration." 2021-01-22 22:15:21 +00:00
Paul Duffin
8479ea296d Merge "Allow createGlobalSoongConfig() to be used from tests" 2021-01-22 17:42:00 +00:00
Paul Duffin
c44075b710 Merge "Add java.RegisterRequiredBuildComponentsForTest function" 2021-01-22 17:41:02 +00:00
Hai Zhang
496baeec09 Add new dependencies for moving role into module.
Bug: 173606718
Test: build
Test: manually verify role related functionality works
Change-Id: Iba390110453a8e4e24df554901ceadfb2e94ee2a
2021-01-22 11:42:00 +00:00
Hai Zhang
6ff02b2d00 Add framework-permission-s java_sdk_library.
This will host the moved framework classes for role.

Bug: 158736025
Test: build
Change-Id: I567bc46dda319b82e4c165ad89e1636e339f1753
2021-01-22 11:35:49 +00:00