Commit Graph

2576 Commits

Author SHA1 Message Date
Treehugger Robot
4721a650ed Merge "Pass list of module libraries to gen_ndk_backed_by_apex.sh" am: d85d058820 am: f085577d59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580725

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I05b12c5bec69c62676966211129a14cf47248f2d
2021-02-09 04:25:40 +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
2e1e98a9f0 Merge "Integrate hiddenapi processing into boot jars test" am: 5d0572b7eb am: bd74e3d616 am: fbed5afb1b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577724

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie1d357a61ed69757e2b79bfdfee06cff099e3365
2021-02-08 19:22:16 +00:00
Paul Duffin
0257302bd2 Merge "Exclude exported_java_libs dependencies from visibility checks" am: 1a75902832 am: d3cbf8531a am: 7d83aa8d86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580146

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1696046270d964b472acffd728f00397c96f99d2
2021-02-08 19:22:10 +00:00
Paul Duffin
fbed5afb1b Merge "Integrate hiddenapi processing into boot jars test" am: 5d0572b7eb am: bd74e3d616
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577724

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I92a46820dfa1eb868b63f89c9e3db423d4cb47db
2021-02-08 19:19:12 +00:00
Paul Duffin
7d83aa8d86 Merge "Exclude exported_java_libs dependencies from visibility checks" am: 1a75902832 am: d3cbf8531a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580146

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I82fc68bd34b3255ccf03547a7a5511bf7eceee71
2021-02-08 19:19:08 +00: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
81b9354b7f Ensure subtest failures are reported on subtest am: 89886cbdb0 am: 215001cb5a am: 10d132bc53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia58cdb61b9de7f307d31b44551eb7f8f3d91992a
2021-02-07 23:30:47 +00:00
Paul Duffin
10d132bc53 Ensure subtest failures are reported on subtest am: 89886cbdb0 am: 215001cb5a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1577723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia53596f4fd57261d515bc66428c08cb75bfc149a
2021-02-07 22:44:59 +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
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
Treehugger Robot
b0bea13c08 Merge "Remove libbinder_headers from apex_available allowlist" am: b02128ad0b am: a9ed2e4658 am: 16ac5bf5ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie1c3ae4163b8a233a72571af300ec21fd2a8f18b
2021-02-06 04:51:33 +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
16ac5bf5ab Merge "Remove libbinder_headers from apex_available allowlist" am: b02128ad0b am: a9ed2e4658
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If2c1ad35295151348a709773541e4d911a6e07db
2021-02-06 04:22:05 +00:00
Treehugger Robot
b02128ad0b Merge "Remove libbinder_headers from apex_available allowlist" 2021-02-06 03:20:47 +00:00
Jooyung Han
42fe5a7251 Merge "cc: fix version macro for stubs" am: 7701309889 am: 1a90279656 am: ec3a7c5db0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574812

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I607d6dd16636e367c43f491eed4e3461e7c48004
2021-02-06 03:06:35 +00:00
Jooyung Han
ec3a7c5db0 Merge "cc: fix version macro for stubs" am: 7701309889 am: 1a90279656
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574812

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If57ba16d74b9e06c8ce0c6265b5fc65b6b31d390
2021-02-06 02:29:42 +00:00
Jooyung Han
7701309889 Merge "cc: fix version macro for stubs" 2021-02-06 01:41:31 +00:00
Liz Kammer
73f2874a87 Merge "bp2build: convert paths/module refs to Bazel label" am: b7eab01167 am: 6d5454d0f9 am: 595abf120a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1564272

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51fd926cdae810906a75ed132dc70fa2f2c74240
2021-02-05 15:40:11 +00:00
Liz Kammer
595abf120a Merge "bp2build: convert paths/module refs to Bazel label" am: b7eab01167 am: 6d5454d0f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1564272

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I850a7a72980cd003afbb696ff0ae1beba110995a
2021-02-05 15:00:27 +00:00
Liz Kammer
b7eab01167 Merge "bp2build: convert paths/module refs to Bazel label" 2021-02-05 13:39:08 +00:00
Yan Yan
74e171964c Merge "Change IKE min_sdk to 30" am: 3a5c0af0fb am: 18aa1bd39c am: 1c730f9c78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1573465

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8f4e11a5db27adf6f42167b942bf30df34d54597
2021-02-05 09:55:47 +00:00
Yan Yan
1c730f9c78 Merge "Change IKE min_sdk to 30" am: 3a5c0af0fb am: 18aa1bd39c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1573465

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2a255cc67e9bd4f3e8fb1f4d6325afe6e89dc53d
2021-02-05 08:55:03 +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
ed110a297b Merge "New header lib added to apex/allowed_deps.txt" am: 87bd0f3c22 am: 7ca0af1e40 am: bdab9f0af9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574081

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibd35bbb8a622d1171dfc5503c1ee07700c4b0ae0
2021-02-05 05:47:33 +00:00
Treehugger Robot
bdab9f0af9 Merge "New header lib added to apex/allowed_deps.txt" am: 87bd0f3c22 am: 7ca0af1e40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574081

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e6315a1aca4363c1712c94fea5b20894e17eb27
2021-02-05 05:00:38 +00: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
David Su
8d456191bb Merge "Add Wifi module allowed deps" into sc-dev 2021-02-04 16:14:26 +00: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
Treehugger Robot
51fc942026 Merge "Add no_op binary." am: 56d12a058e am: d4137332ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1572320

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I63fa24a48f8e36df7cddf48a675c822653488f43
2021-02-03 19:40:42 +00: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
TreeHugger Robot
bf08215c5f Merge "Add no_op binary." into sc-dev 2021-02-03 09:19:15 +00:00
David Su
cfb8440217 Add Wifi module allowed deps
Bug: 178711289
Test: compiles
Change-Id: I8bcbf79e99ce1dcfe2d7c982572f26b423f12f71
Merged-In: I8bcbf79e99ce1dcfe2d7c982572f26b423f12f71
2021-02-02 14:21:59 -08:00
David Su
249062a88e Add Wifi module allowed deps
Bug: 178711289
Test: compiles
Change-Id: I8bcbf79e99ce1dcfe2d7c982572f26b423f12f71
2021-02-02 14:06:10 -08:00
Dario Freni
0d3ff6d918 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
2021-02-02 20:26:10 +00:00
Paul Duffin
f7e2ff5dc9 Merge "Fix some minor issues with boot_image" am: aded43c808 am: 92db324beb am: 2c1c3cac9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1566176

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad8a038903907bfc0a74a98852929c1fa7961cf3
2021-02-01 11:47:48 +00:00
Paul Duffin
fff9e13ed8 Merge "Add boot_images to apex" am: 4a838dfb3f am: 4849ec99b9 am: 4694cf7c81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1560278

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I59b4310efac004352f572252b78d68155f7d78e9
2021-02-01 11:39:07 +00:00
Paul Duffin
2c1c3cac9e Merge "Fix some minor issues with boot_image" am: aded43c808 am: 92db324beb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1566176

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I54537d03a79ad26895ecbee9be0e64fbde575c0f
2021-02-01 11:02:35 +00:00
Paul Duffin
4694cf7c81 Merge "Add boot_images to apex" am: 4a838dfb3f am: 4849ec99b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1560278

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I61aa45660665daf63e98ff1d51c2171ba76e0aa8
2021-02-01 11:02:23 +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