Commit Graph

4857 Commits

Author SHA1 Message Date
satayev ff97fc5f87 Merge "Make SystemServerJars ConfiguredJarList." am: 63bc30fc12 am: fb5c5cd8ee am: 0caa3a31f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1695707

Change-Id: I092ce2214e749870d0298b53ea925ba77b6b4f03
2021-05-06 12:24:59 +00:00
satayev 0caa3a31f1 Merge "Make SystemServerJars ConfiguredJarList." am: 63bc30fc12 am: fb5c5cd8ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1695707

Change-Id: Iac71d56beab3b106a20275867034e871b00a974c
2021-05-06 12:09:30 +00:00
satayev 63bc30fc12 Merge "Make SystemServerJars ConfiguredJarList." 2021-05-06 11:32:39 +00:00
Anton Hansson 65b1fcbd30 Merge "Move stub providers to droidstubs.go" am: 93e8f79577 am: 6e2cb706a9 am: 1c7a3af8e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697050

Change-Id: Ia78cd777b640ec199e83124303b4969712ab0d98
2021-05-05 14:25:35 +00:00
Anton Hansson 1c7a3af8e9 Merge "Move stub providers to droidstubs.go" am: 93e8f79577 am: 6e2cb706a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697050

Change-Id: I4ba9fb69d07b6ce5c7d7bed21b0d2a10e20b019c
2021-05-05 14:07:10 +00:00
satayev 9a6f87ebd6 Make SystemServerJars ConfiguredJarList.
Consistent with plumbing of boot jars. SystemServerJars only support /system/framework/ jars.

Bug: 180105615, 155630745
Test: m && launch_cvd
Change-Id: I58b005b7c4103c8e250090e995b1d9b2f9ed4a76
2021-05-05 14:24:02 +01:00
Anton Hansson 93e8f79577 Merge "Move stub providers to droidstubs.go" 2021-05-05 13:17:37 +00:00
Anton Hansson 5260932812 Move stub providers to droidstubs.go
They fit better there than in droiddoc.go.

Test: m nothing
Change-Id: I44588f1df2094f14881f920246bd19ffc6e1615c
2021-05-05 10:36:05 +01:00
Paul Duffin df2363886c Support dex_import on platform_bootclasspath am: 4977540bcb am: d40a947de4 am: 07ec76efa9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690875

Change-Id: Ib5b1708ff780fb2eb485752dc97531b5df10324d
2021-05-04 18:39:55 +00:00
Paul Duffin 07ec76efa9 Support dex_import on platform_bootclasspath am: 4977540bcb am: d40a947de4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690875

Change-Id: I0b3db8fc192526b65aeecf406adceb2a37339002
2021-05-04 18:12:26 +00:00
Paul Duffin 4977540bcb Support dex_import on platform_bootclasspath
Maintain compatibility with previous behavior by ignoring dex_import
during hidden API processing.

Bug: 179354495
Test: m nothing
Change-Id: I976b02129bf981b7b61dce233567d6f89e04f92d
2021-05-04 14:07:23 +01:00
Colin Cross f66d8c85fc Merge changes If6996bd8,I91df5c3f am: b55ceca568 am: f40a872210 am: 57230dd2a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691595

Change-Id: I4b96418a2f4079b9d493fe8039f785a9cb1e0e1b
2021-05-04 00:05:16 +00:00
Colin Cross 57230dd2a0 Merge changes If6996bd8,I91df5c3f am: b55ceca568 am: f40a872210
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691595

Change-Id: I1590eed9ebbfe556383a15f142f2782076492869
2021-05-03 23:49:34 +00:00
Colin Cross 29c294b2cf Time out and dump stacks from R8 processes after 30 minutes
R8 processes are sometimes hanging on the build servers.  Wrap R8 with
run_with_timeout to dump the stacks with jstack and kill the process
after 30 minutes.  Switch from running with the r8-compat-proguard
shell script to running the jar directly so that jstack gets the pid
of the java process.

Bug: 181095653
Test: m checkbuild
Test: m NetworkStackNextIntegrationTests
Test: m USE_RBE=true RBE_R8=true RBE_R8_EXEC_STRATEGY=remote NetworkStackNextIntegrationTests
Change-Id: If6996bd8eb39c7a8453d79e825004339c009ade2
2021-04-30 14:14:46 -07:00
Paul Duffin f4a4e865cf Merge "Split findAndCopyBootJars into separate find and copy functions" am: 21695e2ce9 am: ca945032c8 am: 60bdd6c0ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688393

Change-Id: I2c42f4e70245a1d37d8690abe0b61b71fd04adf9
2021-04-30 17:02:45 +00:00
Paul Duffin 60bdd6c0ff Merge "Split findAndCopyBootJars into separate find and copy functions" am: 21695e2ce9 am: ca945032c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688393

Change-Id: I06de6a17abd3d80c4a45834cfa73d43801c5ee9c
2021-04-30 16:44:18 +00:00
Paul Duffin 21695e2ce9 Merge "Split findAndCopyBootJars into separate find and copy functions" 2021-04-30 16:09:56 +00:00
Paul Duffin 83545d0d06 Merge "Fix build failure when building unbundled apps (second try)" am: fdf4050440 am: 3e7cb6c6e2 am: fba7e1865b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690873

Change-Id: Ib96a5fb9091d1a8023591dae214a36c52c25668b
2021-04-30 15:14:00 +00:00
Paul Duffin fba7e1865b Merge "Fix build failure when building unbundled apps (second try)" am: fdf4050440 am: 3e7cb6c6e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690873

Change-Id: I22f53ffb39fe742312b0c46f88df873a399e0159
2021-04-30 14:57:29 +00:00
Paul Duffin fdf4050440 Merge "Fix build failure when building unbundled apps (second try)" 2021-04-30 14:16:32 +00:00
Treehugger Robot cb249eb7d0 Merge "Move configuration checks from getBootImageJar" am: 3f9af76391 am: e4a004eaa3 am: a1fe410f89
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688391

Change-Id: I3dc9ceef57776a0198911365d2235b471f412513
2021-04-30 13:57:30 +00:00
Treehugger Robot a1fe410f89 Merge "Move configuration checks from getBootImageJar" am: 3f9af76391 am: e4a004eaa3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688391

Change-Id: Ibca12ee5931a2de6738a42b320ae0f4ce2628f64
2021-04-30 13:37:58 +00:00
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
Paul Duffin 28a48992cd Merge "Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule" am: 0e98e86a3c am: ada6da8aa4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686152

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

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

Change-Id: I9f240c97a1fbee88e51b127822791b0b7bf10f9e
2021-04-28 12:28:08 +00:00
Paul Duffin 466563d5c9 Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7 am: 510e829ea5 am: 92659f37b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068

Change-Id: Ie02075fd7521b5f1d4c10440157c0b79fa7d11f1
2021-04-28 08:07:45 +00:00
Paul Duffin 8cc2b616c1 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef am: ef45d2ce43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: If9d5acbb4aadab4d1b63693a919f1fdce754413b
2021-04-28 08:07:37 +00:00
Paul Duffin 44d1594081 Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule
This simplifies the process of moving the updatableBcpPackagesRule to
the platform_bootclasspath by separating the gathering of the list of
updatable modules (which differs between the singleton and the
platform_bootclasspath module) from the gathering of the permitted
packages list and generation of the rule which are generally common.

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: I3cb64310f618059758a32cfe00d3745d52388e49
2021-04-28 09:03:46 +01:00
Paul Duffin 2ac45f019b Remove special handling of frameworks/base/config/boot-profile.txt
Previously, the method was run in repo manifests that did not include
the frameworks/base repository so it had to handle the file being
missing. However, now that this is being called from
platform_bootclasspath which is only defined in frameworks/base that
is no longer required.

Bug: 177892522
Test: m droid
Change-Id: I77fa5a204d1426a6be24a6f0b48e18f48f3dd908
2021-04-28 09:03:46 +01:00
Paul Duffin ad19d3858e Move bootFrameworkProfileRule to platform_bootclasspath
Changes bootFrameworkProfileRule to use ModuleContext instead of
SingletonContext and moves the call from dexpreoptBootJar's
GenerateSingletonBuildActions method to platform_bootclasspath's
GenerateAndroidBuildActions.

Changing the context also allows the code to switch from
bootFrameworkProfileRule to GetGlobalSoongConfig.

Also extracts the shouldBuildBootImages function so it can be used by
platform_bootclasspath to preserve the existing behavior.

Bug: 177892522
Test: m droid
Change-Id: I30d3ca10be7f84348ad3aa9cc984dd15b8f6f4e9
2021-04-28 09:03:46 +01:00
Paul Duffin 92659f37b3 Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7 am: 510e829ea5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068

Change-Id: Id0d7393cc95b38579e11769d4c9fc61036603827
2021-04-28 07:34:58 +00:00
Paul Duffin ef45d2ce43 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: Ie49d51cba706e0d5c568b5e3ef3fa8f5febc2061
2021-04-28 07:34:48 +00:00
Paul Duffin 0c2e08312c Extract IsModuleInVersionedSdk
Bug: 177892522
Test: m nothing
Change-Id: I348d380a0d29abdd6a84420be52cc1b674f2a7ab
2021-04-28 00:39:52 +01:00
Paul Duffin 976b0e5bbb Automatically export bootclasspath_fragment stubs from sdk
This change makes the tag that is used to add dependencies onto stubs
from the bootclaspath_fragment module cause the dependency to be
automatically exported from the sdk. If the dependency is a
java_sdk_library then it will be as if it was added to the
java_sdk_libs property, otherwise it will be as if it was added to the
java_header_libs property instead.

Bug: 177892522
Test: m nothing
Change-Id: I97010c4342dd39415dba81a4395db7831410436e
2021-04-27 23:27:34 +01:00
Paul Duffin eee466e439 Pass module to SdkMemberTypeDependencyTag.SdkMemberType
This change allows an SdkMemberTypeDependencyTag to select the
SdkMemberType to use to add a dependency based on the module.

Bug: 177892522
Test: m nothing
Change-Id: I2d6e51b615636dc7cd41da65808ef851dd8ae6ac
2021-04-27 23:23:20 +01:00
Paul Duffin 7fbc5842cd Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833 am: 29b18b8c17 am: 8db612ebab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: Ic8a3591508399db477da9a72f21ee9619373cebc
2021-04-27 17:43:17 +00:00
Paul Duffin 6aa72dca5e Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4 am: c7cf6ac1e7 am: 3d87058cf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: I9a4ec33c1b70563b23791588f132444cc384d7f7
2021-04-27 17:43:11 +00:00
Paul Duffin 67cb5fb7f3 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878 am: b49dae2874 am: 539a24e1d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: I8e184836ffec1c13cbefc802db9761999a0f0dfd
2021-04-27 17:43:02 +00:00
Paul Duffin 8db612ebab Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833 am: 29b18b8c17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: Ifd9767dc1b40ac4a5346c7528329fb314aadfddc
2021-04-27 17:42:25 +00:00
Paul Duffin 3d87058cf8 Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4 am: c7cf6ac1e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: I9d5ef5fce5a283d55e7128fd41869e6dd8db5ff0
2021-04-27 17:42:16 +00:00
Paul Duffin 539a24e1d0 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878 am: b49dae2874
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: Ie70916fa9d33bf32e9e6bd41506e07d7a721e391
2021-04-27 17:41:55 +00:00
Paul Duffin 5861242a78 Extract default image specific logic from buildBootImage
Previously, buildBootImage had to be called for the default boot image
config before the art boot image config as it created some rules which
were specific to default boot image. The creation of these rules was
encapsulated in Config().Once(..) to ensure that they were only ever
created once.

This change extracts that functionality out of buildBootImage to the
calling method which means that they are only called once and so no
longer need protecting against being called again.

Bug: 177892522
Test: m droid
Change-Id: I464477de1a08df15e577873a9accf7db2bc088d1
2021-04-27 15:56:47 +01:00
Paul Duffin 57e2e7d199 Simplify missing deps handling in buildBootImage
Previously, the buildBootImage function maintained a list of
missingDeps that was returned from findAndCopyBootJars and was passed
to various other methods that created ninja rules that depended on the
files created by findAndCopyBootJars. The purpose of that list was
basically to record that findAndCopyBootJars could not find some files
so that the subsequent ninja rules could be marked as being in error.

This changes avoids having to explicitly propagate the missing deps to
each rule by instead having findAndCopyBootJars generate an error rule
instead of a Cp rule for any missing file. That means that any attempt
to build any rule that depends on the missing file will fail when the
missing file is created.

Bug: 177892522
Test: Add an unknown module to PRODUCT_BOOT_JARS
      lunch art_module_arm64
      - Run each of the following targets and made sure it failed with a
        message indicating that the unknown module was missing.
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/module_arm64/dex_bootjars/boot.prof
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/boot.bprof
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/updatable-bcp-packages.txt
Change-Id: Ib7196c128419fbffdfeb61c1c5d47a3b08d1e132
2021-04-27 15:56:47 +01:00
Paul Duffin 81667c8c11 Remove panics from reportMissingVariationDependency
The code that has been removed triggers in many cases when it should
not, e.g. an unknown module on the bootclasspath. The code was
originally added to try and ensure that if the attempt to add useful
error messages failed it would help debug the issue. However, it ended
up just creating more failures.

If this does become an issue then this will be revisited.

Bug: 177892522
Test: Add an unknown module to PRODUCT_BOOT_JARS
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true
Change-Id: I08dbd4b29d301f3f1f78a0fb396687062b47deb8
2021-04-27 15:56:47 +01:00
Treehugger Robot f7e6ab6eab Merge "Drop DexPreoptImages field in dexpreopt config" am: bdae1e5765 am: 73ec83be2c am: 51801ac108
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686011

Change-Id: I36a7c371baadf9c19bb7c03efcaebefee6b4b336
2021-04-27 03:23:10 +00:00
Treehugger Robot 51801ac108 Merge "Drop DexPreoptImages field in dexpreopt config" am: bdae1e5765 am: 73ec83be2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686011

Change-Id: I32468596016b597a7717eaf1e6a618b12f1a5a97
2021-04-27 02:57:14 +00:00
Treehugger Robot bdae1e5765 Merge "Drop DexPreoptImages field in dexpreopt config" 2021-04-27 01:53:45 +00:00
Paul Duffin 04c7a35a60 Merge "bootclasspath_fragment: Always output contents property in snapshot" am: aef7fcfa7e am: 817d462f97 am: b9e926f26a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686127

Change-Id: Ie02e884b4271c39c4a101e326c85eb2207434c76
2021-04-26 23:38:51 +00:00
Paul Duffin 940a777464 Merge "Automatically add bootclasspath_fragment contents to sdk" am: 56d3ea4998 am: 7d43ff1fd8 am: b157de0c84
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686126

Change-Id: I809cb2e96f550dc718886e8a78e20e7795883bd2
2021-04-26 23:37:45 +00:00
Paul Duffin d9668be58b Merge "Allow contents and image_name to be specified together" am: 3d14889c5b am: 1081c7d85e am: 143eb249d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686066

Change-Id: I0a6cce08f1c1b48aa2e9a1832212bf7aa2d8fdec
2021-04-26 23:36:31 +00:00
Paul Duffin b9e926f26a Merge "bootclasspath_fragment: Always output contents property in snapshot" am: aef7fcfa7e am: 817d462f97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686127

Change-Id: I1963c51ffd3b4370d7fdac41d90a13a059edab55
2021-04-26 23:12:39 +00:00
Paul Duffin b157de0c84 Merge "Automatically add bootclasspath_fragment contents to sdk" am: 56d3ea4998 am: 7d43ff1fd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686126

Change-Id: I2adc481b5f3716bba1410120643e77cd91ad5c9b
2021-04-26 23:12:05 +00:00
Paul Duffin 143eb249d6 Merge "Allow contents and image_name to be specified together" am: 3d14889c5b am: 1081c7d85e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686066

Change-Id: I783a73cca2c05596477f46c9b38bf9bc3ba4b68e
2021-04-26 23:10:58 +00:00
Paul Duffin 94cc88a03c Extract java SdkMemberType instances as vars am: 2da0424b19 am: 233f0ac8eb am: 25c77484ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686125

Change-Id: Id7829a5d0f4e45085b597453d42d0d69ebfdfd1b
2021-04-26 21:00:49 +00:00
Paul Duffin 702254af25 Merge "Add coverage specific properties to bootclasspath_fragment" am: ef289f8853 am: ceeb8949f9 am: 5c11c01785
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686065

Change-Id: I342e755de9614c20eaf09f33488d58f1242db312
2021-04-26 21:00:44 +00:00
Paul Duffin 25c77484ae Extract java SdkMemberType instances as vars am: 2da0424b19 am: 233f0ac8eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686125

Change-Id: Ife206868863091d56765e9c8d85f3a6643633baf
2021-04-26 20:37:19 +00:00
Paul Duffin 5c11c01785 Merge "Add coverage specific properties to bootclasspath_fragment" am: ef289f8853 am: ceeb8949f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686065

Change-Id: Id1b8730e45818608e7727d04e01b29567cc13591
2021-04-26 20:37:13 +00:00
Paul Duffin 2dc665bb48 bootclasspath_fragment: Always output contents property in snapshot
Bug: 177892522
Test: m art-module-sdk
      - check generated snapshot contains contents property
Change-Id: I122dedba6600a199bfd83b01988da36ddfd09d63
2021-04-26 21:21:58 +01:00
Paul Duffin e95b53a55d Automatically add bootclasspath_fragment contents to sdk
Previously, both a bootclasspath_fragment and its contents had to be
explicitly added to the sdk. This change means that adding a
bootclasspath_fragment to and sdk will automatically add its contents
as if they were added using java_boot_libs.

Bug: 177892522
Test: m nothing
Change-Id: I8f7e70649f272c9a109d4606571a2d12c44b7904
2021-04-26 21:21:58 +01:00
Paul Duffin ba6afd0dba Allow contents and image_name to be specified together
Previously, only one of the contents or image_name properties could be
specified at once which meant that there was no way to create a
prebuilt which lists its fixed contents while at the same time allowing
it to check that that the contents matched what the build configuration
required.

e.g. a prebuilt_bootclasspath_fragment that had image_name: "art",
could not list its contents and also check that those contents matched
the ART_APEX_JARS which the build configuration required.

This change allows contents and image_name to be specified together and
adds a check to make sure that the contents are consistent with the
configuration appropriate to the image_name. The check is only
performed for modules that are active so that a
prebuilt_bootclasspath_fragment which was created without coverage
enabled (the default) would not cause a build failure in a coverage
build unless it was preferred.

Bug: 177892522
Test: m nothing
Change-Id: Ie601f29f707b3f6030fa7d252afa2c4826cc9f8e
2021-04-26 21:21:58 +01:00
Paul Duffin 2da0424b19 Extract java SdkMemberType instances as vars
This will allow them to be used from elsewhere in a follow up change.

Bug: 177892522
Test: m nothing
Change-Id: I60e94e148af5b1810aea7f724cba090b49ae758e
2021-04-26 21:21:58 +01:00
Paul Duffin 3f81c1c71c Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" am: 46e4a9e6b1 am: 8745a28532 am: d905f6818a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686218

Change-Id: Ifea7de140ee9c69cd6afe85bbc1dfab24e446160
2021-04-26 17:04:45 +00:00
Paul Duffin 3a351c3dbe Merge "Rename BootImageInfo to BootclasspathFragmentApexContentInfo" am: 71c84696f9 am: 8067ee44b3 am: 9e55ae0bd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686216

Change-Id: I2a559dbb5dc14cfcf52407e371a0e628ac693634
2021-04-26 17:04:27 +00:00
Paul Duffin 9d3ea7018d Merge "Remove unused setting of BootImageInfo for platform_bootclasspath" am: 00b47c4a6e am: 5fd9799be6 am: 587c558a1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686215

Change-Id: Ie77a71113bb40ad6474b1f189f6751fc9ef7c8d9
2021-04-26 17:03:44 +00:00
Paul Duffin d905f6818a Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" am: 46e4a9e6b1 am: 8745a28532
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686218

Change-Id: Idbad33644ef2e49fe38e3317d119dfe871404200
2021-04-26 16:37:43 +00:00
Paul Duffin 9e55ae0bd8 Merge "Rename BootImageInfo to BootclasspathFragmentApexContentInfo" am: 71c84696f9 am: 8067ee44b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686216

Change-Id: I5d86b467f47dcf281a99dc157421176aa2220570
2021-04-26 16:37:33 +00:00
Paul Duffin 587c558a1a Merge "Remove unused setting of BootImageInfo for platform_bootclasspath" am: 00b47c4a6e am: 5fd9799be6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686215

Change-Id: I075f02fdbdeed17726654508e49256402619fe53
2021-04-26 16:37:25 +00:00
Paul Duffin c7d1644b0b Add coverage specific properties to bootclasspath_fragment
This allows a bootclasspath_fragment (specifically the
art-bootclasspath-fragment) to specify additional contents to be
appended when coverage is enabled.

The art-bootclasspath-fragment will use this to add jacocoagent to its
contents to ensure that it is always consistent with the configuration.

Bug: 177892522
Test: m nothing
Change-Id: I50d05fe5e0e9b8c14bdf3dfd63bba0ac97e31d48
2021-04-26 17:22:28 +01:00
Paul Duffin 46e4a9e6b1 Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" 2021-04-26 16:12:45 +00:00
Paul Duffin 71c84696f9 Merge "Rename BootImageInfo to BootclasspathFragmentApexContentInfo" 2021-04-26 16:12:16 +00:00
Paul Duffin 00b47c4a6e Merge "Remove unused setting of BootImageInfo for platform_bootclasspath" 2021-04-26 15:42:29 +00:00
Jeongik Cha b19b58a015 Drop DexPreoptImages field in dexpreopt config
The field isn't used anymore.
And DexPreoptImagesDeps will have the slice of which size is the same as
Archs to avoid an error.

Bug: 158843648
Test: m
Change-Id: I520063ff7376811febbc82e1a0a43785feb5bbb2
2021-04-26 23:41:40 +09:00
Paul Duffin 190fdef294 Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment
The dex boot jar for the apex must have had hidden API flags encoded
into it. Currently, the hidden API processing is done within the java
modules themselves so the apex gets the dex boot jar from them.

However, as part of the hidden API modularization work the hidden API
encoding will be performed by the bootclasspath_fragment so this change
prepares for that by delegating the retrieval of the dex boot jars to
the bootclasspath_fragment, via BootclasspathFragmentApexContentInfo.

For the moment that simply delegates straight back to the java module
so this change does not change the build. It will however make it
easier to switch hidden API encoding to the bootclasspath_fragment in
future.

Bug: 179354495
Test: m com.android.art
      - verify that this change does not change its contents
Change-Id: I12eba333749be976bcc72661bb9d6be6cc3c56e3
2021-04-26 11:09:25 +01:00
Paul Duffin e946b327f4 Rename BootImageInfo to BootclasspathFragmentApexContentInfo
Currently, it only contains ART boot image related information, i.e.
.art, .oat and .vdex files. However, follow up changes will extend that
to include other information from bootclasspath_fragment.

Bug: 177892522
Test: m nothing
Change-Id: I2b226131c0eccff0c739a18f265f90caa10a91d9
2021-04-26 10:05:27 +01:00
Vladimir Marko ed4839ef89 Merge "profman: Clean up output profile type options." am: fa64af9961 am: cc48381c3d am: 1560c68a3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685591

Change-Id: I5f6d74f008e3b9f0855a30a6f02f3b4aae9b28b0
2021-04-26 08:45:28 +00:00
Vladimir Marko 1560c68a3a Merge "profman: Clean up output profile type options." am: fa64af9961 am: cc48381c3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685591

Change-Id: Iaad70db39a2d21894c099123d3b04ecb604c9fc1
2021-04-26 08:20:50 +00:00
Vladimir Marko fa64af9961 Merge "profman: Clean up output profile type options." 2021-04-26 07:34:21 +00:00
Paul Duffin f13e07eee2 Remove unused setting of BootImageInfo for platform_bootclasspath
The BootImageInfo is used to populate an apex. A platform_bootclasspath
module cannot be part of an apex so does not need to provide one.

Bug: 177892522
Test: m nothing
Change-Id: I1e1c4962d9d8106a12af80107c4c35828f54ff81
2021-04-25 21:38:14 +01:00
Paul Duffin ff79fcac84 Allow exporting of sdk members to be done per tag am: a720811c38 am: 68dc0a1210 am: 7cfcf56b07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686073

Change-Id: Iaf2d2f7776ab4873ae290023ce5c783fe50eb1b6
2021-04-25 09:22:18 +00:00
Paul Duffin 7cfcf56b07 Allow exporting of sdk members to be done per tag am: a720811c38 am: 68dc0a1210
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686073

Change-Id: I66b7b1f0c254e488e3d17353c5da69e8605b0717
2021-04-25 09:02:06 +00:00
Paul Duffin a720811c38 Allow exporting of sdk members to be done per tag
Previously, every module added to an sdk directly through one of the
SdkMemberType specific properties, e.g. java_libs, was exported and
every module added automatically via a transitive dependencies was not
exported. This change allows that behavior to be customized per tag.

Bug: 186290299
Test: m art-module-sdk
      - verify that this change does not affect its contents.
Change-Id: I563b5bcd823e61c23cdb706cfcbb13337963d550
2021-04-24 22:30:26 +01:00
Paul Duffin defcca19af Merge "Remove unused boot_image module type, prebuilt and sdk member type" am: 95661aab07 am: eb2abd05b9 am: 3aa522ece3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685590

Change-Id: Ie8af346df2979b368130cde35047d5e54e6b7082
2021-04-23 23:38:46 +00:00
Paul Duffin 3aa522ece3 Merge "Remove unused boot_image module type, prebuilt and sdk member type" am: 95661aab07 am: eb2abd05b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685590

Change-Id: I0c618b0920c03bbed8d302be212818bf7fc0af44
2021-04-23 23:03:46 +00:00
Paul Duffin 94993d5ce5 Rename BootImageModule to BootclasspathFragmentModule am: 7771eba88e am: 687425b0af am: 30b9c47cb7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685589

Change-Id: I1898516696beb6049ee1467832455dc1bfdab6f2
2021-04-23 18:57:27 +00:00
Paul Duffin 30b9c47cb7 Rename BootImageModule to BootclasspathFragmentModule am: 7771eba88e am: 687425b0af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685589

Change-Id: I1d09dee1f01774f83b0ca06da3bbab5a9c7f5fe2
2021-04-23 18:35:16 +00:00
Paul Duffin d19f579cea Merge changes Ic32f02a6,Ibe358542 am: d5f8421afd am: e6e95f392a am: 3b7084417b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685586

Change-Id: Ic32a38e064ef652375c8a4da9ab7f9cb497f6da4
2021-04-23 16:38:00 +00:00
Jaewoong Jung 19ef691538 Merge "Fix minor issues in updatability lint CLs." am: 8811dcbb22 am: f623005952 am: ab6d61d1ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684886

Change-Id: Ie315db88ce15bdbca85c2647bd4a160696b21932
2021-04-23 16:37:53 +00:00
Paul Duffin 3b7084417b Merge changes Ic32f02a6,Ibe358542 am: d5f8421afd am: e6e95f392a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685586

Change-Id: I4064c3f51a43583c2ccd4c6ea1ccfbcecc7eb545
2021-04-23 16:15:46 +00:00
Jaewoong Jung ab6d61d1ea Merge "Fix minor issues in updatability lint CLs." am: 8811dcbb22 am: f623005952
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684886

Change-Id: I461530dd340ebb05c10206f8a8b84598a2906ff6
2021-04-23 16:15:38 +00:00
Paul Duffin 8ab3f70cab Merge "Extract general bootclasspath related code into java/bootclasspath.go" am: fbe3a73d48 am: ec874c8232 am: 698629b21e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683884

Change-Id: I4048298a97763bcea925787907734ddf60034e92
2021-04-23 16:05:10 +00:00
Paul Duffin df160eb463 Remove unused boot_image module type, prebuilt and sdk member type
Bug: 177892522
Test: m nothing
Change-Id: I5763b55992e4113506ae5ccdaf9865ee27d8b041
2021-04-23 17:00:26 +01:00
Paul Duffin 7771eba88e Rename BootImageModule to BootclasspathFragmentModule
Also renames files, tests, module types in a similar fashion.

There are still some references to image and boot image. They are kept
for the following reasons:
* image_name - this is the name of an ART boot image, i.e. the
  collection of .art/.oat/.vdex files.
* BootImageInfo - again this is related to the ART boot image.
* .../art_boot_images/... paths - ditto.

Bug: 177892522
Test: m nothing
Change-Id: Ie1f4738061d131fee75de48bc26a7601481bad4d
2021-04-23 16:59:26 +01:00
Paul Duffin d5f8421afd Merge changes Ic32f02a6,Ibe358542
* changes:
  Export classesJars initialized in hiddenAPIExtractInformation
  Generalize the platformBootclasspathDepsMutator
2021-04-23 15:57:46 +00:00
Paul Duffin 698629b21e Merge "Extract general bootclasspath related code into java/bootclasspath.go" am: fbe3a73d48 am: ec874c8232
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683884

Change-Id: I73f3bdc0f529faa17d2917b21cc258920c5ed196
2021-04-23 15:43:24 +00:00
Treehugger Robot 0138a307a7 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." am: 784ad87dd6 am: ae5c25073c am: 9b4279d516
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670070

Change-Id: I3829855044e86b762464cef1ca299ea0be761287
2021-04-23 15:34:16 +00:00
Jaewoong Jung 8811dcbb22 Merge "Fix minor issues in updatability lint CLs." 2021-04-23 15:31:41 +00:00
Treehugger Robot 9b4279d516 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." am: 784ad87dd6 am: ae5c25073c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670070

Change-Id: I7ee3c678a6efe7f94c3ce704bd1cae1bd2e78df1
2021-04-23 15:11:18 +00:00
Paul Duffin fbe3a73d48 Merge "Extract general bootclasspath related code into java/bootclasspath.go" 2021-04-23 15:04:10 +00:00
Treehugger Robot 784ad87dd6 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." 2021-04-23 14:32:33 +00:00
Vladimir Marko 230bd421a8 profman: Clean up output profile type options.
Test: m  # Check output boot profiles with hexdump.
Bug: 148067697
Change-Id: Ic20f415ad4eee1fd6396f320b757420884764d2c
2021-04-23 15:19:16 +01:00
Paul Duffin 49358086fd Merge "Add exported_bootclasspath_fragments to prebuilt_apex/apex_set" am: ed0b64f65b am: 07b9400abb am: 7c1dda11a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683869

Change-Id: I696556aa85dd3d4ca01db854cae0df92f571f999
2021-04-23 14:02:39 +00:00
Paul Duffin 7c1dda11a6 Merge "Add exported_bootclasspath_fragments to prebuilt_apex/apex_set" am: ed0b64f65b am: 07b9400abb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683869

Change-Id: Iab8bbbde2a28b760f746cba92adabc403392838b
2021-04-23 13:38:08 +00:00
Paul Duffin 023dba0a3f Add exported_bootclasspath_fragments to prebuilt_apex/apex_set
This is needed to allow a prebuilt_bootclasspath_fragment to be used
interchangeably with a bootclasspath_fragment in the
platform_bootclasspath module.

The platform_bootclasspath module depends on APEX specific variants of
bootclasspath_fragment modules. That works because the
bootclasspath_fragment modules are part of an apex and so have an APEX
specific variant which the platform_bootclasspath can specify.

Using a prebuilt_bootclasspath_fragment in place of a
bootclasspath_fragment requires that the prebuilt also has an APEX
specific variant.

Specifying exported_bootclasspath_fragments on a prebuilt_apex/apex_set
will cause it to create an APEX variant for the named module whcih will
allow it to be selected by the platform_bootclasspath module.

Bug: 186034565
Bug: 177892522
Test: m nothing
Change-Id: I7ddacc6498ec3a4a9f26c5f78b7f9a033e494d78
2021-04-23 12:12:37 +01:00
Paul Duffin 36187b2cf3 Export classesJars initialized in hiddenAPIExtractInformation
This exports classesJars constructed in hiddenAPIExtractInformation
through the hiddenAPIIntf interface for use by the
bootclasspath_fragment module type.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: Ic32f02a69229d9518772fe6b2a329501dd8cd849
2021-04-23 09:32:14 +01:00
Paul Duffin b67d878b80 Extract general bootclasspath related code into java/bootclasspath.go
The platform_bootclasspath and bootclasspath_fragment modules provide
different capabilities but are related and so have some common
functionality. This change moves some platform_bootclasspath code that
will be of use for bootclasspath_fragment in future into a separate
file.

Bug: 177892522
Test: m nothing
Change-Id: I827b85e33d16155fcc920d553100c9e99267dc4e
2021-04-23 09:32:14 +01:00
Paul Duffin 4994d26bfa Generalize the platformBootclasspathDepsMutator
Adds a BootclasspathDepsMutator that is currently only implemented by
the platform_bootclasspath but which can be implemented by
bootclasspath_fragment too.

Bug: 177892522
Test: m nothing
Change-Id: Ibe35854281004d6e40bf1f797144fb582e8c08b9
2021-04-23 09:32:14 +01:00
Treehugger Robot 1ae7fcd51c Merge "Expose "full" dexpreopt.config" am: a3693772a6 am: 375e5d7a47 am: fcf8e11732
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666384

Change-Id: I182ab0a4ebdb80eb9ff812fb8d21607525769d80
2021-04-23 08:10:51 +00:00
Treehugger Robot fcf8e11732 Merge "Expose "full" dexpreopt.config" am: a3693772a6 am: 375e5d7a47
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666384

Change-Id: I16478381c334c2a47b4bb193aed9c180b609c152
2021-04-23 07:46:03 +00:00
Treehugger Robot a3693772a6 Merge "Expose "full" dexpreopt.config" 2021-04-23 06:47:57 +00:00
Jaewoong Jung 3c87b1df11 Fix minor issues in updatability lint CLs.
Test: TreeHugger
Bug: 182349282
Change-Id: Ifae282d51b088d0562605b41a09696d75c5138f1
2021-04-22 13:40:41 -07:00
Paul Duffin d0283d0a5a Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" am: 0f28a51669 am: b9ede6228f am: c5e960d1ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682091

Change-Id: Ic8ed89598074bc89aaef2d6081e2884b73ee6ef5
2021-04-22 17:22:42 +00:00
Paul Duffin 3b34058072 Merge "bootclasspath_fragment: Add contents to snapshot" am: 6e0a62b773 am: 889010d73a am: 855362a5da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682090

Change-Id: Ie107e8986b9b0dc4251f8e28427399854b44ec43
2021-04-22 17:22:35 +00:00
Paul Duffin d36bd335f9 Merge "Workaround build failure in coverage build" am: c69bfdd53b am: eb3fecce39 am: ab2941a932
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683873

Change-Id: If44e9885f4c1e3d7743bd7a9187f8dca30fdfcad
2021-04-22 17:22:28 +00:00
Paul Duffin c5e960d1ae Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" am: 0f28a51669 am: b9ede6228f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682091

Change-Id: I4feae7a8f003604eeda442fec6b118a8596baaae
2021-04-22 17:20:27 +00:00
Paul Duffin 855362a5da Merge "bootclasspath_fragment: Add contents to snapshot" am: 6e0a62b773 am: 889010d73a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682090

Change-Id: I1a34c19f2fd2ceda3d7353f933a31957d1844d54
2021-04-22 17:10:41 +00:00
Paul Duffin ab2941a932 Merge "Workaround build failure in coverage build" am: c69bfdd53b am: eb3fecce39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683873

Change-Id: I9d3985c9bd13058a8ec1c2469b0cdc695f7e9a8d
2021-04-22 17:10:34 +00:00
Paul Duffin 0f28a51669 Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" 2021-04-22 17:02:58 +00:00
Paul Duffin 6e0a62b773 Merge "bootclasspath_fragment: Add contents to snapshot" 2021-04-22 17:01:24 +00:00
Paul Duffin c69bfdd53b Merge "Workaround build failure in coverage build" 2021-04-22 16:54:12 +00:00
Paul Duffin a9dd6faae5 Workaround build failure in coverage build
The jacocoagent is special as while it is depended on by prebuilts it
is not actually a prebuilt.

Bug: 177892522
Bug: 186118711
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing
      Previous command fails without this change and works with it.
Change-Id: I8fba922fc40919936d74a6f95af745e37f1ca61f
2021-04-22 17:31:50 +01:00
Jaewoong Jung abf3d40d84 Merge changes Ia74a2b83,I30a46c8f,Iac7c0149 am: d6599f5573 am: a9aa24ea33 am: c7f1d66e2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683373

Change-Id: I6cb94032c7ddb0b62dad2dbb4a3b2ac5fe31ec68
2021-04-22 16:18:18 +00:00
Paul Duffin 5bca2f26f2 Merge "Move monolithic stub flags generation to platform_bootclasspath" am: 57d13c6892 am: 5774eb9e14 am: ea69b4109b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683866

Change-Id: Id0e5e6dc8596b7d47fe65c47a66da7a86c20c6cb
2021-04-22 16:17:56 +00:00
Paul Duffin 1dfa82423f Merge "Extract common stub flags code" am: d631512659 am: d8d72e85f6 am: 9b76c7bee2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683865

Change-Id: I1225ec1b03ec04745e982918d8540298a7f6b9de
2021-04-22 16:17:20 +00:00
Jaewoong Jung c7f1d66e2c Merge changes Ia74a2b83,I30a46c8f,Iac7c0149 am: d6599f5573 am: a9aa24ea33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683373

Change-Id: I39be09feff6fa678f31c8a131a1e66e8aa219046
2021-04-22 15:53:47 +00:00
Paul Duffin ea69b4109b Merge "Move monolithic stub flags generation to platform_bootclasspath" am: 57d13c6892 am: 5774eb9e14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683866

Change-Id: Ia4b4ad562a0e90351334cae9a323466f6c7a569b
2021-04-22 15:53:26 +00:00
Paul Duffin 9b76c7bee2 Merge "Extract common stub flags code" am: d631512659 am: d8d72e85f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683865

Change-Id: I2aa0acb55e98e1399516f582525419d93fbadc14
2021-04-22 15:53:13 +00:00
Jaewoong Jung d6599f5573 Merge changes Ia74a2b83,I30a46c8f,Iac7c0149
* changes:
  Add lint.strict_updatability_linting
  Move Java lint tests to lint_test.go
  Forbid bypassing updatability lint checks.
2021-04-22 15:39:41 +00:00
Paul Duffin 57d13c6892 Merge "Move monolithic stub flags generation to platform_bootclasspath" 2021-04-22 15:06:16 +00:00
Paul Duffin d631512659 Merge "Extract common stub flags code" 2021-04-22 15:05:54 +00:00
Paul Duffin 677de9427b Merge changes I67589bcc,Ibcfae390 am: 7cbdf81e95 am: 33f495f305 am: 13b9d25ed4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683868

Change-Id: Idb4d7af1bf9914bf7bf0306d04daf74ee992fc5e
2021-04-22 15:05:03 +00:00
Paul Duffin 13b9d25ed4 Merge changes I67589bcc,Ibcfae390 am: 7cbdf81e95 am: 33f495f305
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683868

Change-Id: I1b3d7fae197d3e072ac205cfe8e09a1c6bf0ddc3
2021-04-22 14:41:43 +00:00
Paul Duffin 7cbdf81e95 Merge changes I67589bcc,Ibcfae390
* changes:
  Replace boot image with bootclasspath fragment in sdk package
  bootclasspath_fragment must only depend on source contents
2021-04-22 14:02:43 +00:00
Anton Hansson 67e20e2ff8 Merge "Add new stub_only_static_libs attr for sdk_library" am: 24eac476d4 am: ec47b30e0e am: 05ecab28a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682097

Change-Id: Ie716a56bd455bead4ee1bad88203cb7d24d10512
2021-04-22 13:39:57 +00:00
Paul Duffin 74431d57c6 Move monolithic stub flags generation to platform_bootclasspath
As part of that this change:
* Moves code that will be common to platform_bootclasspath and
  bootclasspath_fragment from hiddenapi_singleton.go into
  hiddenapi_modular.go.
* Fixes the tests in hiddenapi_singleton_test.go but intentionally
  does not rename them or move them into a more appropriate place so
  as to make it easier to see the differences. A TODO has been added
  and these will be cleaned up in a follow up change.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
2021-04-22 14:23:28 +01:00
Paul Duffin 3e7fcc3fe7 Extract common stub flags code
The stubFlagsRule does three separate tasks:
1. It computes the set of modules that provide the stubs.
2. It scans all the modules to find the stub modules and retrieves the
   paths to their dex files.
3. It constructs the ninja rule.

Of those three tasks, 1 and 3 will be same for the
platform_bootclasspath. Instead of searching all the modules for the
ones that provide the stubs it will simply add dependencies onto the
stub modules and retrieve the dex file paths from them.

This change extracts tasks 1 and 3 into separate methods for reuse. It
also parameterizes the generation of the ninja rule.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I893845dbddc4b001dfd44d0e0b1c8a31b7f3f89f
2021-04-22 14:23:08 +01:00
Anton Hansson 05ecab28a3 Merge "Add new stub_only_static_libs attr for sdk_library" am: 24eac476d4 am: ec47b30e0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682097

Change-Id: Iafe4f8df922fc2234de596b1f1c3819accc50656
2021-04-22 13:11:33 +00:00
Anton Hansson 24eac476d4 Merge "Add new stub_only_static_libs attr for sdk_library" 2021-04-22 12:41:46 +00:00
Artur Satayev a34bee0ec5 Don't plumb PRODUCT_*_CLASSPATH vars to make.
They were used to generate export values for BOOTCLASSPATH and friends;
which are now generated by derive_classpath service based on proto
configs at runtime.

Bug: 180105615
Test: m && launch_cvd; presubmit / DeviceBootTest
Change-Id: Ifbf3f076a00e084d47a48180a4286fc53e610c5d
2021-04-22 13:35:52 +01:00
Anton Hansson dae54cd84f Add new stub_only_static_libs attr for sdk_library
Allow java_sdk_libraries to include libraries statically into their
stubs. The immediate use-case of this is to embed libcore notice files
into their stubs.

Also extend the java_sdk_library tests for impl/stub-only-libs, plus
some not assert utils.

Bug: 173186484
Bug: 184839599
Test: soong tests
Change-Id: I1ebf2f35c048eab5cec5125482a0304fe660f188
2021-04-22 10:20:13 +01:00
Rupert Shuttleworth 51fbe9023c Merge "Add various test files as testSrcs, so that they run on CI." am: dac451715b am: 950c2381dd am: bd7a5537b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683265

Change-Id: I689bd1e06c0ddf6166d8ff01496898095df72c97
2021-04-22 04:17:02 +00:00
Rupert Shuttleworth bd7a5537b8 Merge "Add various test files as testSrcs, so that they run on CI." am: dac451715b am: 950c2381dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683265

Change-Id: I9e1739c19cab87cdc17bed5a88e21e52f9d0f6df
2021-04-22 03:55:31 +00:00
Treehugger Robot 684051abed Merge "Add tempPathForRestat to improve consistency" am: f434cb5c1d am: 6c1532d37e am: 5aab26cdda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683867

Change-Id: Ib5b3dc68a1af2d479bd1b09546174c7c0f8c25e6
2021-04-22 03:37:46 +00:00
Treehugger Robot 5aab26cdda Merge "Add tempPathForRestat to improve consistency" am: f434cb5c1d am: 6c1532d37e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683867

Change-Id: I014911a6d439cdb52ddcc5372eaa6e03506e8ebb
2021-04-22 03:12:43 +00:00
Rupert Shuttleworth dac451715b Merge "Add various test files as testSrcs, so that they run on CI." 2021-04-22 03:08:21 +00:00
Jaewoong Jung 48de883834 Add lint.strict_updatability_linting
The flag prevents developers from skipping updatability lint checks with
baseline files

Test: lint_test.go & manual
Bug: 182349282
Change-Id: Ia74a2b83c7ef686124128bdf16f7b85a919d9e8d
2021-04-21 16:56:49 -07:00
Jaewoong Jung 11623b6052 Move Java lint tests to lint_test.go
Test: lint_test.go
Bug: 182349282
Change-Id: I30a46c8f704e66cd04541c78d3f22a140d3284ef
2021-04-21 16:56:43 -07:00
Jaewoong Jung 79e6f6bfcc Forbid bypassing updatability lint checks.
Test: lint_test.go
Bug: 182349282
Change-Id: Iac7c01493b449c2ddd6df6c68f8a74dfe72dfd7a
2021-04-21 16:56:19 -07:00
Paul Duffin 7c95555d79 bootclasspath_fragment: Add hidden API flag files to snapshot
These are needed at the moment to ensure the hidden API processing
generates the same set of flags whether it is being generated from
source or prebuilts. Soon these will be needed to ensure that the
hidden API flags generated for the individual modules are compatible
with previous releases.

Bug: 179354495
Test: m art-module-sdk and check snapshot zip contains the files
      and the generated Android.bp references them.
Change-Id: I9a3334cc48faa381bbbcbbb59479db719042796a
2021-04-21 23:54:22 +01:00
Paul Duffin a57835e8e5 bootclasspath_fragment: Add contents to snapshot
Bug: 177892522
Test: m nothing
Change-Id: I54fe0537b758a0e3dacd34b139ef3eb21b8841fd
2021-04-21 23:54:22 +01:00
Paul Duffin d3c1513df9 Add tempPathForRestat to improve consistency
Previously, there were two approaches used to construct the temporary
path needed by the commitChangeForRestat method and neither was
suitable for general use. One was:
    android.PathForOutput(ctx, outputPath.Rel()+".tmp")
The other was:
    combinedAidl.ReplaceExtension(ctx, "aidl.tmp")

The first approach would not work if the supplied path had been created
by PathForModuleOut() or similar as it would drop the module directory.
That could lead to the same path being used for multiple rules.

The second approach would not work for files with a different
extension.

The tempPathForRestat combines the two approaches so it can be used
generally with any WritablePath.

Bug: 179354495
Test: verified that the ninja rules that used these files were not
      changed by these changes.
Change-Id: I4439dea0a823512c281eeb1366522fb49dceb4e3
2021-04-21 23:26:57 +01:00