Commit Graph

36254 Commits

Author SHA1 Message Date
Treehugger Robot
3e51be492f Merge "Generate empty classpaths.proto for bootclasspath_fragment.go." am: a556647c50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699193

Change-Id: Idc249094fafaf46cfd0222b7ea9fb81ddb65d259
2021-05-11 13:10:43 +00:00
Treehugger Robot
a556647c50 Merge "Generate empty classpaths.proto for bootclasspath_fragment.go." 2021-05-11 12:53:23 +00:00
satayev
e5cf47e902 Merge "Move conv_classpaths.proto to packages/modules/common." am: 7b6d059326
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699942

Change-Id: I79bab381e05c3454b23adf76e64d6dab68941255
2021-05-11 10:04:24 +00:00
satayev
3db3547d1f Generate empty classpaths.proto for bootclasspath_fragment.go.
- Adds all required details for bootclasspath_fragment to implement
  classpath_fragment.
- Keeps the actual boot jars in platform-bootclasspath to begin with.
- Makes sure to put the file in apex/etc/classpath on device. Note that
  for platform versions of classpath fragment AndroidMkEntries perform
  the installation, while for APEXes it must be plumbed via apex.go.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6101ebdf5b8bcbe95c0b7ce21f3f67a2685aef50
2021-05-11 10:34:47 +01:00
satayev
7b6d059326 Merge "Move conv_classpaths.proto to packages/modules/common." 2021-05-11 09:30:03 +00:00
Paul Duffin
b999da770a Merge "Add support for name-less modules and property comments" am: 05f86890ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702368

Change-Id: I50389b3ff3fbe943b657da0301f18f039d1da46b
2021-05-11 07:42:11 +00:00
Paul Duffin
a5b2055183 Merge "Allow an sdk member type not to provide a bp property" am: bea70fb54e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702367

Change-Id: I815de02730276bcce700240c8e86e55b25855046
2021-05-11 07:41:53 +00:00
Paul Duffin
5a0a87eb16 Merge "Allow sdk snapshot to contain source module type" am: f08e7c444c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702366

Change-Id: I1b31218defef43f8d2b6268f7424baebde15324a
2021-05-11 07:41:44 +00:00
Paul Duffin
fdd9631810 Merge "Move setting of prefer to createMemberSnapshot" am: 9a59e70fe1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702365

Change-Id: I2d20e3a541af960b5875a67e6b6bc0f63a1df3ed
2021-05-11 07:39:08 +00:00
Paul Duffin
05f86890ee Merge "Add support for name-less modules and property comments" 2021-05-11 07:19:06 +00:00
Paul Duffin
bea70fb54e Merge "Allow an sdk member type not to provide a bp property" 2021-05-11 07:18:41 +00:00
Paul Duffin
f08e7c444c Merge "Allow sdk snapshot to contain source module type" 2021-05-11 07:18:06 +00:00
Paul Duffin
9a59e70fe1 Merge "Move setting of prefer to createMemberSnapshot" 2021-05-11 07:17:32 +00:00
Lukács T. Berki
3baab77119 Merge "Fix typo caused by incorrect git merge." am: 9c9a069ae6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1701987

Change-Id: Ib71c6bf8c38518e0df91f1399e46a7ee681a8234
2021-05-11 06:16:36 +00:00
Lukács T. Berki
9c9a069ae6 Merge "Fix typo caused by incorrect git merge." 2021-05-11 06:01:30 +00:00
Paul Duffin
0df49686b3 Add support for name-less modules and property comments
Bug: 181569894
Test: m nothing
Change-Id: Ia4da1d2a55a924db82ae999da455adedbaca47c0
2021-05-11 01:00:12 +01:00
Paul Duffin
1308205638 Allow an sdk member type not to provide a bp property
Bug: 181569894
Test: m nothing
Change-Id: I7e98f14cb377683457fba32fd05d6c614f78ffeb
2021-05-11 01:00:06 +01:00
Paul Duffin
0d4ed0ac56 Allow sdk snapshot to contain source module type
Bug: 181569894
Test: m nothing
Change-Id: I30513dd22e2719099a1a1ef63cacc98336d02e9f
2021-05-11 00:59:56 +01:00
Colin Cross
92fddc04f0 Merge "Store real number of records in regular end record when possible" am: b00df8cc48
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1700385

Change-Id: Ib7804ccc60f8c8ae4026b220d04b8ce7eb1987b6
2021-05-10 23:36:44 +00:00
Colin Cross
b00df8cc48 Merge "Store real number of records in regular end record when possible" 2021-05-10 23:14:11 +00:00
Paul Duffin
83ad956ec4 Move setting of prefer to createMemberSnapshot
Test: m nothing
Change-Id: Iab1c048fe74a5e474f68ce4acc6c1b41381368ca
2021-05-11 00:05:53 +01:00
Chris Parsons
6dfc0bbe94 Handle cc_library shared/static only properties am: 0864831019
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699029

Change-Id: I19dd5929cf14b0fce173f9945b79a7964337a9b2
2021-05-10 23:00:51 +00:00
Rupert Shuttleworth
3b413d35a4 Fix typo caused by incorrect git merge.
Test: bazel build //bionic/...
Test: cd cc; go test
Test: cd bp2build; go test
Change-Id: I334e02609203f332384256e990f2c40a016fc9e5
2021-05-10 18:41:51 -04:00
Paul Duffin
c012dfc534 Merge "Generalize deapexer module to export any files" am: d8561166eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697666

Change-Id: I055c7f96e30cba9cbb3dfd09d0e6e9194e35a4f0
2021-05-10 20:01:26 +00:00
Paul Duffin
977a1c20cd Merge "Simplify prebuilt_apex/apex_set common properties" am: 9f361c301d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697665

Change-Id: Ibc5be44b5fa804272c66a22b6d19ca81d3201f8c
2021-05-10 19:57:41 +00:00
Chris Parsons
0864831019 Handle cc_library shared/static only properties
Also handle whole_static_libs via a different attribute
(whole_archive_deps), separating these dependencies from regular static
deps.

Test: Build //bionic/libdl with bazel in conjunction with bzl
changes

Change-Id: I45019b6127a0d2731592ec35537ca15e77001cc2
2021-05-10 14:06:47 -04:00
Paul Duffin
d8561166eb Merge "Generalize deapexer module to export any files" 2021-05-10 16:49:06 +00:00
Paul Duffin
9f361c301d Merge "Simplify prebuilt_apex/apex_set common properties" 2021-05-10 15:55:03 +00:00
Paul Duffin
955ddedc44 Merge "Derive deapexer module properties from transitive dependencies" am: eeec6bd460
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697058

Change-Id: I706fc7a18b7597e1e7d9d3aaef128a3dd6320899
2021-05-10 14:47:05 +00:00
Paul Duffin
c9b695b6d7 Merge "Move creation of deapexer modules to separate mutator" am: b60def6def
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697057

Change-Id: I023a8dba9ef6e433e0e6b992a7e936d3f0adf237
2021-05-10 14:46:12 +00:00
Paul Duffin
eeec6bd460 Merge "Derive deapexer module properties from transitive dependencies" 2021-05-10 14:33:49 +00:00
Paul Duffin
b60def6def Merge "Move creation of deapexer modules to separate mutator" 2021-05-10 14:31:18 +00:00
Paul Duffin
3bae068ee5 Generalize deapexer module to export any files
Previously, the deapexer module had to duplicate the java library
specific logic for constructing the path to the library's dex file in
the .apex file. That is not something that the deapexer needs to be
aware of, all it needs is a list of files that should be exported.

This change moves that logic into the prebuilt_apex/apex_set modules
and generalizes the deapexer module so that it can export any files
that are requested.

The deapexer module does still need to know which java modules need
access to exported files so it can add dependencies from them onto
itself. However, it does not need to know what the type of the module
is.

Bug: 186455808
Test: m nothing
      m SOONG_CONFIG_art_module_source_build=false nothing
Change-Id: I71c6f0f761efe3b6d66d54273786e98cd545811c
2021-05-10 14:26:37 +01:00
satayev
73c7b8547a Move conv_classpaths.proto to packages/modules/common.
The classpaths.proto file is needed at build time to generate appropriate
classpath configs for the modules. Unbundled ART branches do not include
packages/modules/SdkExtenstion in their manifest; so put the proto in a
project that should be visible to all unbundled modules.

Bug: 180105615
Test: m nothing
Change-Id: Ie5be1822fbee92f280332622a9317894cc98d7ac
2021-05-10 13:14:23 +01:00
Paul Duffin
bb0dc13afe Simplify prebuilt_apex/apex_set common properties
Moves all properties common to prebuilt_apex and apex_set module types
into prebuiltCommonProperties. Removes selectedApexProperties from
Prebuilt as that duplicated, and masked, the same property in
prebuiltCommon.

Bug: 187266082
Test: m nothing
      m SOONG_CONFIG_art_module_source_build=false nothing
      - this fails but not because of missing APEX variants
Change-Id: Ice7dfb8e18bb526fdd5b41bcd518c6971564d81b
2021-05-10 12:01:29 +01:00
Rupert Shuttleworth
b68f7c11d3 Merge "Add temporary workaround for pack_relocations linker flag conversion for bp2build." am: e8f13bbb04
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1700745

Change-Id: I069dcf492a2be20557f6279286b7a9096d82da7c
2021-05-10 10:57:41 +00:00
Paul Duffin
57f8359fe3 Derive deapexer module properties from transitive dependencies
Previously, the deapexer module properties were simply passed through
from the prebuilt_apex/apex_set modules. This change derives the
properties from the transitive dependencies of the modules so that it
can automatically include the contents of a bootclasspath_fragment
module without having to duplicate them in the exported_java_libs
property.

Part of this change involves moving the addition of dependencies onto
the prebuilt apex's contents from DepsMutator to ComponentDepsMutator
so that they can be visited in the createDeapexerModule() function. The
ComponentDepsMutator runs before prebuilts without matching sources are
renamed to match the source name which simplifies the process of adding
dependencies directly onto the prebuilts.

The deapexerDeps method was renamed as the dependencies are added both
for use by deapexer and also to create APEX variants for access by
platform_bootclasspath so the name was confusing.

Bug: 187266082
Test: m nothing
      m SOONG_CONFIG_art_module_source_build=false nothing
      - this fails but not because of missing APEX variants
Change-Id: Icb4f883e7d2b63739e5ff0dc6edb8a906d80189b
2021-05-10 11:51:20 +01:00
Paul Duffin
5dda3e387e Move creation of deapexer modules to separate mutator
Previously, deapexer modules were created by the LoadHook which meant
that the deapexer module could not use any information derived from the
dependencies of the prebuilt_apex/apex_set modules. This change moves
the creation into a separate mutator that runs after
ComponentDepsMutator and before DepsMutator. That means that a follow
up change can use information from dependencies added by the former
mutator in order to create the deapexer module and the deapexer module
can itself add dependencies onto other modules.

This change also dedups the logic to determine whether a deapexer
module is needed by pushing it down into the createDeapexerModule
method which was renamed to createDeapexerModuleIfNeeded to reflect its
conditional nature.

Bug: 187266082
Test: m nothing
      m SOONG_CONFIG_art_module_source_build=false nothing
Change-Id: I65316473ff1e4b2827ff48ab5a870a8ce5c0475a
2021-05-10 11:41:40 +01:00
Rupert Shuttleworth
e8f13bbb04 Merge "Add temporary workaround for pack_relocations linker flag conversion for bp2build." 2021-05-10 10:40:23 +00:00
Paul Duffin
a96729add3 Merge "Add SOONG_SDK_SNAPSHOT_PREFER support" am: 4d0ee38fb7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697674

Change-Id: Ic3e13afe9897c7dc1d1302c8e1f688daac805710
2021-05-10 09:20:25 +00:00
Rupert Shuttleworth
b28a33ceca Add support for shared_libs in cc_library targets. am: c50fa8dd05
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697794

Change-Id: Iac3b732e28b87ae39062fa025b26dd73cf60f9e9
2021-05-10 09:19:37 +00:00
Rupert Shuttleworth
143be94016 Add temporary workaround for pack_relocations linker flag conversion for bp2build.
Test: added unit test
Test: bazel build //bionic/...
Change-Id: I28217026f5846820ea2cc32cf8790948a54a9365
2021-05-10 05:17:42 -04:00
Paul Duffin
4d0ee38fb7 Merge "Add SOONG_SDK_SNAPSHOT_PREFER support" 2021-05-10 09:00:47 +00:00
Rupert Shuttleworth
c50fa8dd05 Add support for shared_libs in cc_library targets.
Test: cd bp2build; go test

Test: bazel build //bionic/...

Test: ./build/bazel/scripts/run_presubmits.sh

Change-Id: I71e279470a0d69b243dd0a2b53ce31842fd36ee4
2021-05-10 03:35:32 -04:00
Treehugger Robot
f8f3b93130 Merge "Rename fields in dexpreopt config" am: 564fce4578
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699427

Change-Id: I4b7b7660109810ffccca2711cfe492a5787194c3
2021-05-08 02:04:33 +00:00
Treehugger Robot
564fce4578 Merge "Rename fields in dexpreopt config" 2021-05-08 01:47:39 +00:00
Colin Cross
06eea2c9b8 Store real number of records in regular end record when possible
Only store uintmax for the number of entries in the regular end record
if it doesn't fit.  p7zip 16.02 rejects zip files where the number of
entries in the regular end record is larger than the number of entries
counted in the central directory.

Fixes: 187485108
Test: TestZip64P7ZipRecords
Change-Id: I0d116e228a0ee26e4e95bb3f35771da236a056eb
2021-05-08 00:18:04 +00:00
satayev
4c58850bbf Merge "Declare ConfiguredJarList in specific fragment implementations." am: ee7e359131
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699192

Change-Id: I4d406077cdcbc092b9672bf3bf1c05c464c9e1eb
2021-05-07 19:58:58 +00:00
satayev
ee7e359131 Merge "Declare ConfiguredJarList in specific fragment implementations." 2021-05-07 19:41:08 +00:00
Treehugger Robot
afa1bff5aa Merge "Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath." am: 3b755d4560
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689755

Change-Id: I1241af54ca19334578bb43005700bde5fae32afa
2021-05-07 18:41:01 +00:00