Commit Graph

37326 Commits

Author SHA1 Message Date
Paul Duffin
2ee29af83b Merge "Simplify prebuilt_apex/apex_set common properties" am: 9f361c301d am: 977a1c20cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697665

Change-Id: Ic9d24b3aa970b96adb2a91b152904c0e19fab27a
2021-05-10 20:15:54 +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
Paul Duffin
9f361c301d Merge "Simplify prebuilt_apex/apex_set common properties" 2021-05-10 15:55:03 +00:00
Paul Duffin
0bdaee7798 Merge "Derive deapexer module properties from transitive dependencies" am: eeec6bd460 am: 955ddedc44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697058

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

Change-Id: I649625c6f7ebf4e44ef45510fef03ee156106d15
2021-05-10 15:01:25 +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
Rupert Shuttleworth
7f8a21cf3e Merge "Add temporary workaround for pack_relocations linker flag conversion for bp2build." am: e8f13bbb04 am: b68f7c11d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1700745

Change-Id: I6d1b2461879108ad743667d0652ada46677eb631
2021-05-10 11:16:00 +00: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
9fd85517ee Merge "Add SOONG_SDK_SNAPSHOT_PREFER support" am: 4d0ee38fb7 am: a96729add3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697674

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

Change-Id: I93210931d7d5b3908037a1e816e918e1aca0933d
2021-05-10 09:35:26 +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
517f7ba95b Merge "Rename fields in dexpreopt config" am: 564fce4578 am: f8f3b93130
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699427

Change-Id: I6614ad3de51e09cd74ef0b75e31bfca3ac116cb5
2021-05-08 02:27:10 +00: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
satayev
01ac28b3bb Merge "Declare ConfiguredJarList in specific fragment implementations." am: ee7e359131 am: 4c58850bbf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699192

Change-Id: Ief67bfa6e112726d610acc30547b3526d563bce0
2021-05-07 20:29:12 +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
1ba4987c0e Merge "Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath." am: 3b755d4560 am: afa1bff5aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689755

Change-Id: I6346fe8c962441bebd49bb007f888e3577a94cbe
2021-05-07 18:49:22 +00:00
Elliott Hughes
2aa090f638 Merge "Remove most of the remaining references to gccCmd." am: aa4c712989 am: a09ee94843
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1696319

Change-Id: I3d6520fb4d290158d729225fbed945f28625b142
2021-05-07 18:48:29 +00:00
Elliott Hughes
9fb4c1bbac Merge "Remove unused parts of the strip implementation." am: 2e0436c7af am: e21f8f645c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697656

Change-Id: I877f85e65332773d4649754e1573d9a0cff3ee58
2021-05-07 18:48:18 +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
Elliott Hughes
a09ee94843 Merge "Remove most of the remaining references to gccCmd." am: aa4c712989
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1696319

Change-Id: Ia39631f189b56118df77fd22794cb3add7fc25a5
2021-05-07 18:35:21 +00:00
Treehugger Robot
3b755d4560 Merge "Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath." 2021-05-07 18:34:52 +00:00
Elliott Hughes
e21f8f645c Merge "Remove unused parts of the strip implementation." am: 2e0436c7af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697656

Change-Id: I4fa057fce73f68a436dad57d7d6ff0387297c1ff
2021-05-07 18:33:04 +00:00
Elliott Hughes
aa4c712989 Merge "Remove most of the remaining references to gccCmd." 2021-05-07 18:15:42 +00:00
Elliott Hughes
2e0436c7af Merge "Remove unused parts of the strip implementation." 2021-05-07 18:15:17 +00:00
satayev
013485bd83 Declare ConfiguredJarList in specific fragment implementations.
Each specific classpath_fragment module knows what jars must be part
of the corresponding classpaths.proto config.

Note that bootclasspath_fragment does not implement classpath_fragment
yet, thus all boot jars and all system server jars go into corresponding
platform classpaths.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6a8c7b0a5d17d62e790a441b8e2c5c1a816e7f30
2021-05-07 16:31:07 +01:00
Paul Duffin
690697082b Merge "Install updatable-bcp-packages.txt and boot-image.bprof" am: 225e4dbae4 am: 655970204c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699203

Change-Id: I4954e75a300a11f86a20e7113afaeec107295faf
2021-05-07 15:04:51 +00:00
Paul Duffin
655970204c Merge "Install updatable-bcp-packages.txt and boot-image.bprof" am: 225e4dbae4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699203

Change-Id: I1153a08b44946b9d4b8100e79f55faa77f232386
2021-05-07 14:34:55 +00:00
Paul Duffin
225e4dbae4 Merge "Install updatable-bcp-packages.txt and boot-image.bprof" 2021-05-07 14:14:20 +00:00
Paul Duffin
2e4abd4a58 Merge "Stop exporting java_sdk_library libs in the snapshot" am: 320055eb8c am: 78ff835a32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697676

Change-Id: I309abc61fb11075093214df29eda9ef1d44cd595
2021-05-07 14:05:10 +00:00
Paul Duffin
64fb526cd0 Add SOONG_SDK_SNAPSHOT_PREFER support
By default the generated snapshot has prefer: false. Building it with
SOONG_SDK_SNAPSHOT_PREFER=true will force it to generate prefer: true.

Bug: 157884619
Test: m nothing
      m SOONG_SDK_SNAPSHOT_PREFER=true art-module-sdk
      - check the generated Android.bp file to make sure it contains
        prefer: true
Change-Id: Ied297b32d9bd4822a140fa99016f38e234c50f64
2021-05-07 14:54:35 +01:00
Paul Duffin
78ff835a32 Merge "Stop exporting java_sdk_library libs in the snapshot" am: 320055eb8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697676

Change-Id: If21ded2582835f36062511d43d03aa2c10827cf4
2021-05-07 13:48:55 +00:00
Paul Duffin
320055eb8c Merge "Stop exporting java_sdk_library libs in the snapshot" 2021-05-07 13:34:33 +00:00
Paul Duffin
8d108bac17 Merge "Make all SdkMemberTypes support transitive member deps" am: dbb490359a am: e1fab6a30b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699188

Change-Id: Ia82883e6085db6f19ed5c5307b78e72959cd4da2
2021-05-07 12:44:10 +00:00
Paul Duffin
65d891eb67 Merge "Make licenseModule SdkAware" am: e746f30a0b am: 11abc8f8d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699187

Change-Id: I15ee1ef26db007e5b65152baf05e84b5bbbffbb4
2021-05-07 12:44:05 +00:00
Paul Duffin
7b8d04b3b8 Merge "Make sdk tests more realistic" am: e0fc8725f3 am: bef3a5ce3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699186

Change-Id: I899ecb12c2d87598befccdb2a98b8047ffec7fe3
2021-05-07 12:44:01 +00:00
Paul Duffin
33334e65b7 Merge "Add missing calls to InitSdkAwareModule" am: 820ed78954 am: c74ff5cae5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699185

Change-Id: I4bf1ee3640bab68d7c38079e71eec25f212a84c3
2021-05-07 12:43:54 +00:00
Jeongik Cha
a596909342 Rename fields in dexpreopt config
Add 'host' into the name of fields regarding path on the host side to
distinguish between paths on the device(which will be added in the
following commit), and paths on the host.

Bug: 158843648
Test: build and flash, and then
  adb wait-for-device \
    && adb -s $S root \
    && adb -s $S logcat \
    | grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
Change-Id: Ib2645ed51591ba2f4b726c115b401ad2bd6675da
2021-05-07 21:40:23 +09:00