Commit Graph

36347 Commits

Author SHA1 Message Date
Paul Duffin
e48bebd77d Use java_sdk_library in bootclasspath_fragment contents as stubs am: 34827d4c0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707567

Change-Id: Ie666d52edb78080becf91b2976c2e37420a591ad
2021-05-14 06:53:23 +00:00
Paul Duffin
02618f854e Validate monolithic and modular hidden API flags are consistent am: dfa1083fee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705309

Change-Id: I06e9d4f6235fb05a15ea86f132ac740a2e973c27
2021-05-14 06:53:17 +00:00
Paul Duffin
c23b7e4d5b Generate hidden API flags for a bootclasspath_fragment am: 2fef136885
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705308

Change-Id: I1366239380164141b6c4b8ccb3eba7955704421e
2021-05-14 06:46:56 +00:00
Paul Duffin
251bb0cfaf Populate hiddenAPI structure even when not active am: 001e606e5c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707568

Change-Id: I019e147931b2bbaacfc538df5ba3ce6e019464c2
2021-05-14 06:11:16 +00:00
Paul Duffin
5afc79746a Disallow shared libraries in bootclasspath_fragment contents am: f4600f6e6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707566

Change-Id: I91d1e97f0eaeafa6d9feca9d5c478b7dc643dc4f
2021-05-14 06:10:37 +00:00
Paul Duffin
34827d4c0e Use java_sdk_library in bootclasspath_fragment contents as stubs
A java_sdk_library specified in the bootclasspath_fragment contents
must be providing APIs for the bootclasspath_fragment and so must be
treated as if they were specified in the stub_libs. This avoids having
to specify them in both contents and stub_libs.

Bug: 179354495
Test: m nothing
Change-Id: I535065ee1a79b439e2676f35e06a75d4626adcaf
2021-05-14 01:49:19 +01:00
Paul Duffin
dfa1083fee Validate monolithic and modular hidden API flags are consistent
This makes sure that where there is overlap between the hidden API
flags generated for a module and the monolithic flags that they are
identical. That ensures that the modular hidden API flags will be
compatible with previous releases that relied on the monolithic flags.

Bug: 179354495
Test: m out/soong/.intermediates/art/build/boot/art-bootclasspath-fragment/android_common_apex10000/modular-hiddenapi/all-flags.csv
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - Create some inconsistencies between the above two files.
      m out/soong/hiddenapi/hiddenapi-flags.csv.valid
Change-Id: Iaf9e23cef63e221608955d89dc8d496bcc70c86e
2021-05-14 01:49:19 +01:00
Paul Duffin
2fef136885 Generate hidden API flags for a bootclasspath_fragment
This change adds support for generating the hidden API flags for the
contents of a bootclasspath_fragment. Currently, it will only work for
the art-bootclasspath-fragment as it has no support for creating
dependencies between bootclasspath_fragment modules which will be
needed for handling any other bootclasspath_fragment.

The hidden API flag generation added by this change is completely
separate to the normal hidden API processing and is not as yet encoded
in dex jars so will have no effect on the runtime.

The generated files are provided for use by other modules and copied
into the sdk snapshot. That is needed to allow the build to verify that
the hidden API flags generated by the individual bootclasspath_fragment
modules are consistent with the flags generated for the whole
bootclasspath, whether building from source or prebuilts.

Bug: 179354495
Test: m art-module-sdk
      m out/soong/.intermediates/art/build/boot/art-bootclasspath-fragment/android_common_apex10000/modular-hiddenapi/all-flags.csv
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - test that the former file is a subset of the latter and that
        where they overlap they are identical.
Change-Id: Ie27303e2960953db1b7abe95510e3bca4411b09a
2021-05-14 01:48:51 +01:00
Paul Duffin
001e606e5c Populate hiddenAPI structure even when not active
The modular hidden API processing needs access to the classesJarPaths
and bootDexJarPath fields of the hiddenAPI structure even if the
modules are not themselves considered to be active participants in the
existing hidden API processing.

This change moves the initialization of those fields to before inactive
modules are ignored.

Bug: 179354495
Test: m art-module-sdk out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I06f96d39d0b413295d3e2af50453ebe7e4d3e9c8
2021-05-14 01:45:42 +01:00
Yuntao Xu
6b968b9531 Merge "syntax check to jacoco filters for any build" am: 0589914135
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1706576

Change-Id: I2fb69092310540ef9029fe76075a3b6098ec3070
2021-05-13 23:44:58 +00:00
Paul Duffin
f4600f6e6a Disallow shared libraries in bootclasspath_fragment contents
Bug: 177892522
Test: m nothing
Change-Id: I78c8ef8664ec1eb0fe3456a2de2cb956162ca0da
2021-05-14 00:39:24 +01:00
Yuntao Xu
0589914135 Merge "syntax check to jacoco filters for any build" 2021-05-13 23:11:48 +00:00
Treehugger Robot
2a4deaaf6d Merge "Soong: check if lndk is needed for apex build" am: ef0439d969
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705069

Change-Id: I6155c3404d7b125f84eed05299c16c09da6fca7c
2021-05-13 23:05:05 +00:00
Treehugger Robot
ef0439d969 Merge "Soong: check if lndk is needed for apex build" 2021-05-13 22:49:39 +00:00
Paul Duffin
94a452c768 Add java_sdk_library in bootclasspath_fragment contents to sdk am: a10bd3c127
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705470

Change-Id: I03dcf4b107c2cd390f6f90ce930bfbf007c147b2
2021-05-13 22:42:06 +00:00
Zhijun He
ec2858799b Soong: check if lndk is needed for apex build
This is to fix the unnecessary dependencies inclusion
when building apex modules.

Test: Build
Bug: 186306595
Change-Id: I1f3bbdb0a1f97a8338b45ca29c92acf9b20eadd3
2021-05-13 14:04:45 -07:00
Paul Duffin
a10bd3c127 Add java_sdk_library in bootclasspath_fragment contents to sdk
A java_library specified in a bootclasspath_fragment's contents
property will be automatically added to the sdk containing that
bootclasspath_fragment. Previously, if that was attempted with a
java_sdk_library it would be added to the sdk as if it was a normal
java_boot_libs which would prevent the sdk from containing the
API specific artifact such as current.txt files and stub libraries
and sources.

This change fixes that and adds a java_sdk_library as a java_sdk_libs
module.

Bug: 177892522
Test: m nothing
Change-Id: Ided57b846ce5b8940c7e898c786fd77602582ea2
2021-05-13 21:25:42 +01:00
Paul Duffin
1d579e9694 Merge "Add support for converting OptionalPath to Paths" am: 17ccf26748
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1706747

Change-Id: I9605a7479b974ef369de702ededb84a3ba0c1f37
2021-05-13 19:51:55 +00:00
Yuntao Xu
5b009aedf9 syntax check to jacoco filters for any build
Perform syntax check to jacoco filters for any build.

Bug: 183622051
Test: Manual
Test: TreeHugger
Change-Id: Iff90d7b45bdad8706c43c7e16d98270af688d20b
2021-05-13 12:42:24 -07:00
Paul Duffin
17ccf26748 Merge "Add support for converting OptionalPath to Paths" 2021-05-13 19:33:09 +00:00
Paul Duffin
748d954062 Merge "Build boot images in bootclasspath_fragment/platform_bootclasspath" am: 4bbf45faef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690884

Change-Id: I455bd7455192bd6f6ac392d6932310f116038d57
2021-05-13 16:52:11 +00:00
Paul Duffin
4bbf45faef Merge "Build boot images in bootclasspath_fragment/platform_bootclasspath" 2021-05-13 16:32:23 +00:00
Treehugger Robot
66f9ac0d33 Merge "Add support for SOONG_SDK_SNAPSHOT_USE_SRCJAR" am: 820397deb2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1706107

Change-Id: I987da5cdbad7e165251a4fbf1524cd9de77e676a
2021-05-13 16:23:33 +00:00
Treehugger Robot
820397deb2 Merge "Add support for SOONG_SDK_SNAPSHOT_USE_SRCJAR" 2021-05-13 16:00:40 +00:00
Paul Duffin
eb18e84459 Merge "Separate storing config for MakeVars from building boot image" am: f356e5a533
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690882

Change-Id: I55f26ed260006f9e1cf65c505775b0aac2120c8e
2021-05-13 14:24:49 +00:00
Paul Duffin
c088ab8e01 Merge "Make hidden API bootclasspath_fragment test more realistic" am: 7dbfe7c4ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1706746

Change-Id: I41122234294c3e7f7dc6d6171dce14216fda0298
2021-05-13 14:23:30 +00:00
Paul Duffin
f356e5a533 Merge "Separate storing config for MakeVars from building boot image" 2021-05-13 14:01:36 +00:00
Paul Duffin
7dbfe7c4ee Merge "Make hidden API bootclasspath_fragment test more realistic" 2021-05-13 14:00:00 +00:00
Jingwen Chen
58344f0391 Merge "bp2build: build //external/scudo/..." am: ccfd7fc939
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1704771

Change-Id: I7c1fc3cb69469178a4c25a10a57bab776cddf3ab
2021-05-13 12:45:26 +00:00
Jingwen Chen
ccfd7fc939 Merge "bp2build: build //external/scudo/..." 2021-05-13 12:19:43 +00:00
Paul Duffin
ef08185951 Add support for converting OptionalPath to Paths
Appending a Path or Paths to a slice of Paths is simple but appending
an OptionalPath requires conditional logic which makes OptionalPaths
harder to use. This change makes it easy to append the embedded Path,
if any, to a slice of Paths.

Bug: 179354495
Test: m nothing
Change-Id: Ibf80a23043c846162e17c3a98b2590bca653b170
2021-05-13 12:40:08 +01:00
Paul Duffin
475daafb1b Make hidden API bootclasspath_fragment test more realistic
Adds the bootclasspath_fragment to an apex and also adds an sdk library
to the stub_libs property.

Bug: 179354495
Test: m nothing
Change-Id: I2a5fffe915eb62923cc60732352d4d050dec4398
2021-05-13 12:40:08 +01:00
Paul Duffin
7be9378c61 Merge "Move copying of dex files from dexpreopt_bootjars singleton" am: cfd24da1f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690881

Change-Id: I9b492fb1f04f988db99e23fcfd1ec5f09b3ed707
2021-05-13 11:12:00 +00:00
Paul Duffin
cfd24da1f4 Merge "Move copying of dex files from dexpreopt_bootjars singleton" 2021-05-13 10:53:51 +00:00
Jingwen Chen
138b60595c Merge "bp2build: export some cc toolchain flags into Starlark." am: 1d35a87072
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1698426

Change-Id: Ia478ff955f5344330b1cc44c5bfc5f4fbd487fb3
2021-05-13 10:47:28 +00:00
Jingwen Chen
1d35a87072 Merge "bp2build: export some cc toolchain flags into Starlark." 2021-05-13 10:31:54 +00:00
Paul Duffin
2b7d228aac Merge "Move markPlatformAvailability mutator before apexMutator" am: c75bf688cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705264

Change-Id: I856f90156197c15a7bbf0c7d65273044ce756567
2021-05-13 10:08:44 +00:00
Paul Duffin
c75bf688cb Merge "Move markPlatformAvailability mutator before apexMutator" 2021-05-13 09:50:56 +00:00
Paul Duffin
05ca6f6919 Merge "Allow module types to force creation of a default APEX variant" am: 9896b3424b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705263

Change-Id: Ib78cf134090a9c8a955ac262399c88e0aaee2ee2
2021-05-13 08:27:47 +00:00
Paul Duffin
9896b3424b Merge "Allow module types to force creation of a default APEX variant" 2021-05-13 08:07:19 +00:00
Jingwen Chen
75be1cae8f bp2build: build //external/scudo/...
Test: TH
Fixes: 187158841
Change-Id: I73c1d8fe075d2534c2389973b9381405d9389044
2021-05-13 06:25:49 +00:00
Jingwen Chen
bf61afb7f7 bp2build: export some cc toolchain flags into Starlark.
This CL exports common/global/device/host clang/ld/ldd flags
from their Ninja variable initialization locations in
cc/config/global.go and cc/config/clang.go to make Bazel's cc_toolchain
and Soong's cc actions more consistent with each other.

This does not handle env-dependent or arch-specific toolchain flags
yet (logic in compiler.go and linker.go).

Test: TH
Bug: 187086342
Bug: 187084737
Bug: 186628704
Bug: 187857770
Change-Id: Ie403d7cd23f35160897b9dd902c799cbf1bd7f0c
2021-05-13 06:25:47 +00:00
Treehugger Robot
3c11654140 Merge changes I2729001d,Ife5d2193 am: 015a0afe07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702492

Change-Id: Ib3b63a2e818b6d1367ae912b442475122b946a6d
2021-05-12 22:26:36 +00:00
Paul Duffin
22628d50f3 Add support for SOONG_SDK_SNAPSHOT_USE_SRCJAR
Test: m SOONG_SDK_SNAPSHOT_USE_SRCJAR=true ipsec-module-sdk
      - check generated snapshot.zip file.
Change-Id: I02991e2a60d7784984b308cff2c47ee809d61f01
2021-05-12 23:13:22 +01:00
Treehugger Robot
015a0afe07 Merge changes I2729001d,Ife5d2193
* changes:
  packaging: install/package deps if not marked IsHideFromMake
  Generate linker config with packaged items.
2021-05-12 22:08:54 +00:00
Paul Duffin
2fc82ad044 Build boot images in bootclasspath_fragment/platform_bootclasspath
Moves the building of boot images from the dexpreopt_bootjars singleton
to the bootclasspath_fragment and platform_bootclasspath.

The art boot image is generated by the art-bootclasspath-fragment
module and the framework boot image by the platform-bootclasspath
module.

This does temporarly duplicate the generation of an identical boot
profile for each image. As part of the work to modularize the boot
image profile each image will have its own custom default boot profile.

Bug: 177892522
Bug: 186455808
Test: m droid and TreeHugger
Change-Id: I23cf05ec7648749b21c7cf6fcba282b46649a981
2021-05-12 21:51:27 +01:00
Paul Duffin
47932935e9 Separate storing config for MakeVars from building boot image
Previously, the initialization of the dexpreoptBootJars fields used to
store information needed in its MakeVars method was interleaved with
the calls to buildBootImage(). In fact those fields were initialized
from the *bootImageConfig returned by buildBootImage(). However, the
method simply returned the *bootImageConfig value that was passed in.

Separating the initialization from the calls to buildBootImage() allows
the functionality to be moved to platform_bootclasspath separately.

Bug: 177892522
Test: m nothing
Change-Id: I8ba460f60be553516de5f186e14377bb0ec1b2cd
2021-05-12 21:51:27 +01:00
Paul Duffin
7ebebfd5f8 Move copying of dex files from dexpreopt_bootjars singleton
The art dex files are copied in the bootclasspath_fragment and the
non-updatable and updatable dex files are copied in the
platform_bootclasspath.

Bug: 177892522
Test: m nothing
Change-Id: I5d3d533d1a7a9f8e7ae20c12eb33029a898a2cd6
2021-05-12 21:51:19 +01:00
Ivan Lozano
61c475060a Merge "Refactor vendor snapshot to use LinkableInterface." am: 7ce2dee09e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1680606

Change-Id: I1d53688de1f994c9f2c83b723e433c3f02aea2a9
2021-05-12 20:27:49 +00:00
Ivan Lozano
7ce2dee09e Merge "Refactor vendor snapshot to use LinkableInterface." 2021-05-12 20:06:24 +00:00