Commit Graph

4885 Commits

Author SHA1 Message Date
Andrei-Valentin Onea
4a1d304885 Merge "Exclude RequiresApi from generated stubs" am: f794e8269d am: ea34723186 am: c4e90a7a3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690867

Change-Id: I605efcb029fa9566d381db763c81d0d0b9755197
2021-04-30 13:31:53 +00:00
Andrei-Valentin Onea
c4e90a7a3f Merge "Exclude RequiresApi from generated stubs" am: f794e8269d am: ea34723186
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690867

Change-Id: I62b2271e6cdddedfb1b1e7ce417cd3f2fd0ab910
2021-04-30 13:05:55 +00:00
Treehugger Robot
3f9af76391 Merge "Move configuration checks from getBootImageJar" 2021-04-30 12:56:56 +00:00
Paul Duffin
d504c3ac83 Fix build failure when building unbundled apps (second try)
The previous attempt, which simply skipped the hidden API processing
altogether when unbundled builds were enabled failed when attempting to
build module snapshots as while they enabled an unbundled build they
actually need the hidden API processing to be performed.

This change just checks whether missing dependencies are allowed and if
so it fakes up any missing files so that the build will only fail if
they are not present AND they are used.

Bug: 186695448
Bug: 185828824
Test: tapas Calendar
      m -j60

Change-Id: Ie13fed05af0aba51f45f6791fce944d0e4285037
2021-04-30 13:42:44 +01:00
Andrei-Valentin Onea
f794e8269d Merge "Exclude RequiresApi from generated stubs" 2021-04-30 12:31:07 +00:00
Paul Duffin
d6894ca4b9 Split findAndCopyBootJars into separate find and copy functions
The main difference between the dexpreopt_bootjars singleton and the
platform_bootclasspath singleton module is the way they find the
modules to use. The former searches all modules, the latter adds
dependencies on the modules that they need. This change separates the
finding of the modules from the copying of the boot jars for those
modules to make it easier to move the remaining functionality to
platform_bootclasspath.

This temporarily creates a singleton specific copy of the hidden API
function isModuleInConfiguredList() to select the modules in place of
the logic in the getBootJar() method. There is a slight loss of context
information from the error messages but as these methods will be
removed once the boot image creation has moved this is not an issue.

While switching the isModuleInConfiguredListForSingleton() to use the
SingletonContext the error message was fixed to include the name of
the module with the issue.

Bug: 177892522
Test: m nothing
Change-Id: Iaea906da95d9da5301fb964fc593890f2216d336
2021-04-30 12:10:54 +01:00
Paul Duffin
f23bc472b0 Move configuration checks from getBootImageJar
The getBootImageJar function will be removed once the boot image
creation has been moved to the platform_bootclasspath and
bootclasspath_fragment module types. However, the consistency checks
that it performs are still useful so this change moves them out
first.

The ART boot image related checks are now performed in the
bootclasspath_fragment module type. A previous change accidentally
disabled the checks when the contents property was not empty which has
been fixed. Also, the error messages have been tweaked to make it clear
that the art-bootclasspath-fragment is now the source of truth as to
its contents not the configuration.

The framework boot image related checks are now performed in the
platform_bootclasspath module type.

Initially, this change included an extra check to make sure that
UpdatableBootJars comes from updatable APEXes but that broke because
framework-wifi and framework-tethering are not currently marked as
updatable in AOSP.

Bug: 177892522
Test: m nothing
Change-Id: I80fb600fa2c7cec4566b3461c6a33c4c6f0743f4
2021-04-30 12:06:28 +01:00
Treehugger Robot
e6bddfb852 Merge "Revert "Fix build failure when building unbundled apps"" am: 1468cc4a10 am: 00803e6ee9 am: 60fd78300a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691213

Change-Id: I73a5d01fb0ef8032375109f58985a6ab1433b1e6
2021-04-30 03:58:06 +00:00
Treehugger Robot
60fd78300a Merge "Revert "Fix build failure when building unbundled apps"" am: 1468cc4a10 am: 00803e6ee9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691213

Change-Id: If8752e8d442d5141af41b9e607e78634a0121cf7
2021-04-30 03:22:59 +00:00
Treehugger Robot
1468cc4a10 Merge "Revert "Fix build failure when building unbundled apps"" 2021-04-30 01:52:57 +00:00
Vishnu Nair
0dbd02a3ac Revert "Fix build failure when building unbundled apps"
This reverts commit c027119e73.

Reason for revert: b/186797512
Test: vendor/google/build/build_mainline_modules.sh -j80

Change-Id: I2bb062cce09ac6717702c4f6b110acbb2887adec
2021-04-30 00:24:07 +00:00
Paul Duffin
7e425005f3 Merge "Fix build failure when building unbundled apps" am: 5983d856c1 am: 7e953b936d am: 223ffec55e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690870

Change-Id: I54acecf34b0bed3e55879ae299f05d96cad42c60
2021-04-29 21:45:27 +00:00
Paul Duffin
4ed0fb2d22 Merge "Move generation of hidden API make vars to platform_bootclasspath" am: ad7fa97f8d am: 8eee268aa7 am: 29742054b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690548

Change-Id: Ie87b10a2d8b8476639716fbdeef3fa97c059242d
2021-04-29 21:44:57 +00:00
Paul Duffin
223ffec55e Merge "Fix build failure when building unbundled apps" am: 5983d856c1 am: 7e953b936d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690870

Change-Id: I24060082f5c72f6973c05d757b40089e4412b24f
2021-04-29 21:20:15 +00:00
Paul Duffin
29742054b5 Merge "Move generation of hidden API make vars to platform_bootclasspath" am: ad7fa97f8d am: 8eee268aa7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690548

Change-Id: I28a48fc2e7a40b5445a23154430b0673072b302d
2021-04-29 21:19:17 +00:00
Paul Duffin
5983d856c1 Merge "Fix build failure when building unbundled apps" 2021-04-29 20:19:54 +00:00
Paul Duffin
c027119e73 Fix build failure when building unbundled apps
Bug: 186695448
Bug: 185828824
Test: tapas Calendar
      m -j60
Change-Id: I1c5365f6d2afb2f2d159e6f6ed004647ec6d2427
2021-04-29 19:50:40 +01:00
Paul Duffin
f893961bd5 Merge "Make platform_bootclasspath a singleton module" am: 86477cfeb2 am: 4b00abc5f7 am: 8c7c87d7d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690547

Change-Id: Ife696408f4261fd4bc39ac31ac7c34d70cc9a4cc
2021-04-29 18:45:16 +00:00
Paul Duffin
8c7c87d7d7 Merge "Make platform_bootclasspath a singleton module" am: 86477cfeb2 am: 4b00abc5f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690547

Change-Id: I563e1ba0994e692f48e4c247ccc0541ac408908d
2021-04-29 18:28:09 +00:00
Andrei Onea
4985e518f8 Exclude RequiresApi from generated stubs
This annotation is required for linting, but is not useful in stubs.

Bug: 185579441
Test: cherry-pick http://ag/14098354 and regenerate stubs
Change-Id: I7e4da99a8843b9c709f3b59f125f43cbd66bda4e
2021-04-29 17:00:46 +00:00
Paul Duffin
12d29b7786 Move generation of hidden API make vars to platform_bootclasspath
Bug: 179354495
Test: rm out/soong/make_vars*
      m nothing
      grep INTERNAL_PLATFORM_HIDDENAPI_FLAGS out/soong/make_vars*
      - make sure it is still out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I86e56512a9a2091f446bad25294d41ea1f4341ee
2021-04-29 15:11:35 +01:00
Paul Duffin
e8e530cd2c Merge "Move dumpOatRules to platform_bootclasspath" am: 3f9c16af2d am: 58da3e8a80 am: f062acb20b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686128

Change-Id: I5147ab79dc076264f787a42fa5968683a81760b4
2021-04-29 13:32:34 +00:00
Paul Duffin
c2a9baa7d8 Merge "Move generateUpdatableBcpPackagesRule to platform_bootclasspath" am: e084f1d717 am: b72a9487b8 am: ae23514b50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686154

Change-Id: I8386537936c21f1b0cee4372022220395854428e
2021-04-29 13:32:30 +00:00
Paul Duffin
640d548cf7 Merge "Differentiate between art, non-updatable and updatable modules" am: c1fc9faee6 am: c1c4b84478 am: cba4d88707
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686153

Change-Id: I9912def06a1f8a1b64c93be35b8a3c12e3b3a38b
2021-04-29 13:32:26 +00:00
Paul Duffin
2207583cc9 Merge changes I16389102,I105f4fba am: 12206326d6 am: bbc5cbcf0f am: 8255b2c5d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689752

Change-Id: Ic76b304687f2c205c5962c39a44aef0a9afc3a8b
2021-04-29 13:32:19 +00:00
Paul Duffin
f062acb20b Merge "Move dumpOatRules to platform_bootclasspath" am: 3f9c16af2d am: 58da3e8a80
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686128

Change-Id: I8d86338ade67b51e019b558ab1a38e855654c58e
2021-04-29 12:53:04 +00:00
Paul Duffin
ae23514b50 Merge "Move generateUpdatableBcpPackagesRule to platform_bootclasspath" am: e084f1d717 am: b72a9487b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686154

Change-Id: I23c5d58bc071017b40a4c6988e9550e5ab102ef6
2021-04-29 12:53:01 +00:00
Paul Duffin
cba4d88707 Merge "Differentiate between art, non-updatable and updatable modules" am: c1fc9faee6 am: c1c4b84478
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686153

Change-Id: I63837609ea1a88ef2223d9317e5b79fe7658b0e8
2021-04-29 12:52:57 +00:00
Paul Duffin
8255b2c5d1 Merge changes I16389102,I105f4fba am: 12206326d6 am: bbc5cbcf0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689752

Change-Id: I0fcae956aba20eb4c2db993396e74bb7949b3700
2021-04-29 12:52:54 +00:00
Paul Duffin
e3ecce67c1 Make platform_bootclasspath a singleton module
This is needed in order to allow it to implement MakeVars so it can
create make variables just like the dexpreopt_bootjars and hiddenapi
singletons currently do.

Bug: 177892522
Bug: 179354495
Test: m nothing
Change-Id: Ida5bf8abeecde531e1f6430151650065445804ac
2021-04-29 13:37:16 +01:00
Paul Duffin
0c22202947 Merge "Add stub_libs properties to bootclasspath_fragment snapshot" am: 50599f7735 am: ce7396186d am: 454efed2ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686206

Change-Id: If2a3d61b51248c32c70fffc13afc39eb73f9d053
2021-04-29 10:52:40 +00:00
Paul Duffin
f7a5592d38 Move dumpOatRules to platform_bootclasspath
Bug: 177892522
Test: m oat-dump-boot
      - test output to make sure that this change does not change the
        generated files, at least no more than no changes do as the
	output from this rule is not deterministic. See b/186459873.

Change-Id: Ib2b4203d9bb1fd0ee9443aee4e58b54b38b491cf
2021-04-29 11:50:48 +01:00
Paul Duffin
4c094428a7 Move generateUpdatableBcpPackagesRule to platform_bootclasspath
Changes generateUpdatableBcpPackagesRule to use ModuleContext instead
of SingletonContext and moves the call from dexpreoptBootJar's
GenerateSingletonBuildActions method to platform_bootclasspath's
GenerateAndroidBuildActions.

Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I9741ae1eb9573cafe12dd7a17dc1d8449b224dc8
2021-04-29 11:50:48 +01:00
Paul Duffin
01b463bc06 Differentiate between art, non-updatable and updatable modules
Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I3d35f1664cbbaba5df3f5809859dd9815a26d05d
2021-04-29 11:50:42 +01:00
Paul Duffin
9bacf56564 Extract logic to gather deps added for <apex>:<module> pairs
Trades having to traverse a module's direct dependencies multiple times
for reusable code. While at the minute the amount of duplicated code is
small (checking a tag and appending to a list) follow up changes will
modify the gatherApexModulePairDepsWithTag module to improve error
reporting greatly increasing the benefit of deduping.

The cost of traversing a module's direct dependencies is very small as
there will be only a very few dependencies.

Bug: 177892522
Test: m nothing
Change-Id: I16389102abd8038e1bfa52b63f4153bdf92ff553
2021-04-29 11:34:59 +01:00
Paul Duffin
454efed2ed Merge "Add stub_libs properties to bootclasspath_fragment snapshot" am: 50599f7735 am: ce7396186d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686206

Change-Id: I03ad268a1e143379747212c9724ad90c3ab5865c
2021-04-29 10:17:37 +00:00
Paul Duffin
a7c96bb1e5 Merge "Add support for specifying api provided by bootclasspath_fragment" am: 0948060f50 am: 126a48b0c5 am: e30368dc81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686205

Change-Id: I4216d71d26a2e6256220359c60de0927119f5731
2021-04-29 10:02:29 +00:00
Paul Duffin
e30368dc81 Merge "Add support for specifying api provided by bootclasspath_fragment" am: 0948060f50 am: 126a48b0c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686205

Change-Id: If9064df010fb534a0622024a9be8677f5ccc8b04
2021-04-29 09:46:14 +00:00
Paul Duffin
110b0add9e Treat "apex" system_ext the same as platform
Change https://r.android.com/1672245 added support to treat
system_ext:foo in the boot jars configuration the same as platform:foo,
at least for dexpreopt_bootjars.go's getBootJar.

This change replicates that mechanism in platform_bootclasspath and as
that now handles hidden API processing also made a similar change in
the isModuleInConfiguredList function.

Bug: 177892522
Bug: 154976937
Test: m nothing
Change-Id: I105f4fbaa3b0355b013b7c5618d218d888faefb6
2021-04-29 10:35:10 +01:00
Paul Duffin
895c7140a9 Add stub_libs properties to bootclasspath_fragment snapshot
Bug: 177892522
Test: m nothing
Change-Id: I7644122c4abed8e8bc2cc7b58f408bee3bdc91f6
2021-04-28 22:02:00 +01:00
Paul Duffin
1093158faf Add support for specifying api provided by bootclasspath_fragment
The hidden API processing needs access to dex stub jars for the API
scopes provided by the bootclasspath_fragment so that it can mark the
corresponding dex members as being part of that API. This change adds
the ability to specify the modules that provide those jars, resolve the
modules to dex jar stubs and make them available for other modules and
tests to use.

While the stubs are only needed for hidden API at the moment these were
not added to the hidden_api properties section as there are other parts
of the build that may need to access the stubs in future, e.g. api
fingerprint and aidl generation.

The stubs properties can be affected by coverage as when coverage is
enabled the jacoco-stubs needs adding to the list, just like how
jacocoagent is added to the contents.

Bug: 177892522
Test: m nothing
Change-Id: I31097d1ca45c84adeba4cbb38f693698cb289e99
2021-04-28 21:59:46 +01:00
Andrei-Valentin Onea
bf9b4f53de Merge "Replace source based system server stubs" am: b75031e918 am: b45d115816 am: 4f4d9c9d3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642101

Change-Id: I9c3a0e3abd30743925d2019492967c6ad763fa0c
2021-04-28 20:22:58 +00:00
Andrei-Valentin Onea
4f4d9c9d3c Merge "Replace source based system server stubs" am: b75031e918 am: b45d115816
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642101

Change-Id: Ic86a8c810b84173c2fe7f06d57a942d2b9082caa
2021-04-28 19:49:38 +00:00
Andrei-Valentin Onea
b75031e918 Merge "Replace source based system server stubs" 2021-04-28 15:06:22 +00:00
Paul Duffin
388c7abb3f Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6 am: 9e21db0381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I5db0695a6e4ff05a39d6d158aa58b3cdab539d3e
2021-04-28 14:20:34 +00:00
Paul Duffin
9e21db0381 Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I02f65fc878c95b33b91fb64b2dd19a9b75f3cdb0
2021-04-28 13:52:42 +00:00
Paul Duffin
8d817b70e6 Merge "Extract IsModuleInVersionedSdk" 2021-04-28 12:58:43 +00:00
Paul Duffin
08d1fab0ee Merge "Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule" am: 0e98e86a3c am: ada6da8aa4 am: 28a48992cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686152

Change-Id: If7d4792dd003f4025f5b6f93688d5e42afb64bff
2021-04-28 12:46:24 +00:00
Paul Duffin
318e2c53b2 Merge "Remove special handling of frameworks/base/config/boot-profile.txt" am: c2477e8224 am: 497d026b5b am: 0771c16227
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686151

Change-Id: Id6f5067110e0710f2444f2d725fabad0f08b257f
2021-04-28 12:46:18 +00:00
Paul Duffin
953ee81825 Merge "Move bootFrameworkProfileRule to platform_bootclasspath" am: 9abfff5229 am: eec196310d am: c663ddce59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686150

Change-Id: Iba0466a5583e5e10b9a42f8708a09431bd7645d3
2021-04-28 12:46:06 +00:00