Commit Graph

36225 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Paul Duffin
e1fab6a30b Merge "Make all SdkMemberTypes support transitive member deps" am: dbb490359a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699188

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

Change-Id: I700e883007f12cf70a118b9708314c1297c18144
2021-05-07 12:36:28 +00:00
Paul Duffin
dbb490359a Merge "Make all SdkMemberTypes support transitive member deps" 2021-05-07 12:31:15 +00:00
Paul Duffin
e746f30a0b Merge "Make licenseModule SdkAware" 2021-05-07 12:31:03 +00:00
Paul Duffin
bef3a5ce3e Merge "Make sdk tests more realistic" am: e0fc8725f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699186

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

Change-Id: Ic6c043bb9f549fc2326f44b50ee5ff2f38c199c1
2021-05-07 12:27:37 +00:00
satayev
95e9c5bbfa Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath.
Boot jars are different to system server jars at build level, due to
added complexity of dexpreopt. As a logical separation add a new
classpath fragment type and split existing classpaths.proto generation
into relevant pieces.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I88bec09fc920166ffd0092faef980754ddeb6593
2021-05-07 13:24:16 +01:00
Paul Duffin
e0fc8725f3 Merge "Make sdk tests more realistic" 2021-05-07 12:16:25 +00:00
Paul Duffin
820ed78954 Merge "Add missing calls to InitSdkAwareModule" 2021-05-07 12:15:16 +00:00
Paul Duffin
be007d1800 Install updatable-bcp-packages.txt and boot-image.bprof
Previous refactorings of the code for creating these two files caused
them to be created before the boot.prof file instead of afterwards. As
a result even though they were appended to the list of files to install
they were discarded when the boot.prof file set the list rather than
appended to it. That worked before the refactoring because the
boot.prof file set the list first before the others were appended to
it.

This change appends the boot.prof file to the list making the order in
which they are added irrelevant.

Bug: 187494247
Test: m nothing
      - check DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED in generated
        make_vars file to ensure it includes all 3 files.
Change-Id: Idb94531daf61b1b047c72eb5c67a57d3fdced05c
2021-05-07 13:07:34 +01:00
Paul Duffin
c8e88cf3f7 Merge "Transitively add APEX variants for contents of prebuilt_apex/apex_set" am: c76155cd71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697056

Change-Id: I0d375fe05a3f2935d2cae0425322a2d36a6f5c96
2021-05-07 08:45:39 +00:00
Paul Duffin
c76155cd71 Merge "Transitively add APEX variants for contents of prebuilt_apex/apex_set" 2021-05-07 08:24:06 +00:00
Inseob Kim
837b94419f Merge "Add prebuilt_defaults for prebuilt etc modules" am: d91c75ca09
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1698425

Change-Id: Icf6552fe42f1427feabab0562c530fe64a7756ae
2021-05-07 00:29:10 +00:00
Inseob Kim
d91c75ca09 Merge "Add prebuilt_defaults for prebuilt etc modules" 2021-05-06 23:59:18 +00:00
Colin Cross
c24869d391 Merge "Support blueprint_go_binary in PathForModuleSrc" am: 57892ceafb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1694192

Change-Id: I37850b744a3f3eb89bc6566c191fb25e5001ef07
2021-05-06 23:47:54 +00:00
Colin Cross
57892ceafb Merge "Support blueprint_go_binary in PathForModuleSrc" 2021-05-06 23:29:22 +00:00
Paul Duffin
b17d044628 Transitively add APEX variants for contents of prebuilt_apex/apex_set
This is part of the work needed to allow the exported_java_libs
property to be replaced by exported_bootclasspath_fragments.

Bug: 187266082
Test: m nothing
      m SOONG_CONFIG_art_module_source_build=false nothing
Change-Id: I2c1d70a390200b93163f9799719290c9d55a041c
2021-05-06 23:43:43 +01:00