Commit Graph

37518 Commits

Author SHA1 Message Date
Paul Duffin
d12106540b Merge "Stop generating unnecessary hidden API rules" am: b7c78731d4 am: 97961f4837
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707574

Change-Id: Ida624f82ac4394cad434a943271ecc64203fce26
2021-05-14 19:33:28 +00:00
Paul Duffin
8063427dc4 Merge "Generate monolithic hidden API files direct from class jars" am: 21f62ef867 am: b28f562092
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707573

Change-Id: I64919be5a862620eb5077e6f18982e02eae8dcb4
2021-05-14 19:33:23 +00:00
Paul Duffin
29c6e9fa55 Merge "Dedup hidden API rule generation" am: 2bc8b3a646 am: 93b312c2dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707572

Change-Id: Ib9a86e05001db3571b1be5ebb851fa5aa63af044
2021-05-14 19:33:15 +00:00
Paul Duffin
97961f4837 Merge "Stop generating unnecessary hidden API rules" am: b7c78731d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707574

Change-Id: I96fab0709252e6c0730b5a22a06e8a02358653a3
2021-05-14 19:18:34 +00:00
Paul Duffin
b28f562092 Merge "Generate monolithic hidden API files direct from class jars" am: 21f62ef867
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707573

Change-Id: I19deb2643cc128ca9f25d38152db864fdc0fe199
2021-05-14 19:18:27 +00:00
Paul Duffin
93b312c2dd Merge "Dedup hidden API rule generation" am: 2bc8b3a646
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707572

Change-Id: I7d9edfc6383ba6efbc62714c12aa415cb9a45cfd
2021-05-14 19:17:11 +00:00
Paul Duffin
b7c78731d4 Merge "Stop generating unnecessary hidden API rules" 2021-05-14 18:53:08 +00:00
Paul Duffin
21f62ef867 Merge "Generate monolithic hidden API files direct from class jars" 2021-05-14 18:52:11 +00:00
Paul Duffin
2bc8b3a646 Merge "Dedup hidden API rule generation" 2021-05-14 18:51:10 +00:00
Paul Duffin
8a9a8ffd2f Merge "Allow shared libraries on bootclasspath" am: b0f20d134f am: 42a9a2ede6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707576

Change-Id: I96dcd94c06aa2cbf12fbf4e0effb708d26658ccb
2021-05-14 17:51:21 +00:00
Bill Peckham
94f308c04a Merge "Fix missing headers for vndk snapshotted libc" am: 054619d198 am: a1ae5530cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1708168

Change-Id: I5eac5b7651afc447f706067f9f2dfe47508d2278
2021-05-14 17:50:58 +00:00
Colin Cross
690de6069b Merge "Add order-only dependency on shared libraries" am: 9debc21ca3 am: 78894a5ab0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707986

Change-Id: I621d6b50633b130e5db16e3b90f40690fe700e94
2021-05-14 17:50:07 +00:00
Paul Duffin
42a9a2ede6 Merge "Allow shared libraries on bootclasspath" am: b0f20d134f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707576

Change-Id: Ia599b240c43ebd916f3bd4f4c0c1a2b2eb512991
2021-05-14 17:19:49 +00:00
Bill Peckham
a1ae5530cb Merge "Fix missing headers for vndk snapshotted libc" am: 054619d198
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1708168

Change-Id: I31cd498323dd3bb13d72b9927958790d8ca95539
2021-05-14 17:19:40 +00:00
Colin Cross
78894a5ab0 Merge "Add order-only dependency on shared libraries" am: 9debc21ca3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707986

Change-Id: Ia6aeecf11efd617344b1628a8b5aa2291c9ad8c0
2021-05-14 17:17:26 +00:00
Paul Duffin
b0f20d134f Merge "Allow shared libraries on bootclasspath" 2021-05-14 17:03:03 +00:00
Bill Peckham
054619d198 Merge "Fix missing headers for vndk snapshotted libc" 2021-05-14 16:52:11 +00:00
Colin Cross
9debc21ca3 Merge "Add order-only dependency on shared libraries" 2021-05-14 16:48:57 +00:00
Paul Duffin
79fd3d728c Allow shared libraries on bootclasspath
A previous change treated this as an error in order to try and detect
issues with misconfigured java_sdk_library modules and/or
bootclasspath_fragment modules but unfortunately this is not always an
error, e.g. when migrating a library that was a shared library to the
bootclasspath.

This change stops treating that as an error.

Bug: 179354495
Test: m nothing
Change-Id: I4a833ab5f4caf86c6cd340090fc65d2c2f141512
2021-05-14 16:14:17 +01:00
Paul Duffin
afaa47c74a Stop generating unnecessary hidden API rules
The rules to extract hidden API information from an individual module
in order to create module specific files are no longer necessary as
the monolithic files are created directly from the module's class jars
and not the module specific files.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I573ac17f3ea5da5a2a7e4f08718160dacca71c0c
2021-05-14 15:57:10 +01:00
Paul Duffin
537ea3d04c Generate monolithic hidden API files direct from class jars
Previously, the monolithic hidden API files, e.g. hiddenapi-index.csv
file, were generated in two steps. First, each module created its own
files using the information in its class jars. Then, the monolithic
files were created by merging those module specific files into a larger
file.

This change switches to generating the monolithic files directly from
the class jar files and bypassing the intermediate files.

In order to ensure that this change did not change the monolithic files
it is necessary for the hiddenapi-metadata.csv to go through a
reformatting step. Hopefully, this will be able to be removed in a
follow up change.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I5a78e747516014b7c0f402a4b4431b14be6a84b2
2021-05-14 15:57:04 +01:00
Paul Duffin
850e61f234 Dedup hidden API rule generation
Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I54b677c97712a7573ff5eed017c1b2198b80bc51
2021-05-14 14:53:19 +01:00
Paul Duffin
63f7830b71 Make hidden API handle jacoco-stubs consistently am: 098c878838 am: 86d7f1ba59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707571

Change-Id: I23ba1c6f9d5a06e6a1ea03f201ef2499af5417d1
2021-05-14 12:18:23 +00:00
Paul Duffin
86d7f1ba59 Make hidden API handle jacoco-stubs consistently am: 098c878838
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707571

Change-Id: I5b1116f5fadda22142f3bf40f2782c9cf8afc10c
2021-05-14 12:03:46 +00:00
Inseob Kim
cc12d90753 Fix missing headers for vndk snapshotted libc
VNDK snapshot depends on addExportedGeneratedHeaders to grab generated
headers. This change adds a missing addExportedGeneratedHeaders call to
make libc's headers captured correctly.

Bug: 181326838
Test: VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk && unzip -l
out/dist/*.zip

Change-Id: Iaa89b5255c836761a26c77bb27f35f768f49039e
2021-05-14 20:15:55 +09:00
Paul Duffin
098c878838 Make hidden API handle jacoco-stubs consistently
Previously, when code coverage was enabled the monolithic hidden API
processing would add jacoco-stubs to public APIs only as that would
make them accessible for everyone. However, the
art-bootclasspath-fragment added jacoco-stubs to public, system and
test APIs as that was the simplest way of handling it and while the
extract APIs were unnecessary they would not change behavior.

Unfortunately, that lead to a difference in the flags generated which
caused the check that verifies flags are consistent between the
monolithic and modular files to fail.

This change adds jacoco-stubs to system and test APIs for the
monolithic hidden API processing to ensure consistency.

Bug: 179354495
Bug: 188143639
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true out/soong/hiddenapi/hiddenapi-flags.csv
      - ran before making the change to reproduce the problem and after
        to verify the fix.
Change-Id: Icbd15f0ece871a8c44d9e4a73fd0f7acc3760bba
2021-05-14 10:19:46 +00:00
Paul Duffin
735c0a088c Use java_sdk_library in bootclasspath_fragment contents as stubs am: 34827d4c0e am: e48bebd77d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707567

Change-Id: Ic590746d95d388c3f5a8df719d57c4587f731c2a
2021-05-14 07:16:52 +00:00
Paul Duffin
10e912e02f Validate monolithic and modular hidden API flags are consistent am: dfa1083fee am: 02618f854e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705309

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

Change-Id: I6a5f1667db83ce176179b520621eb47b074d326b
2021-05-14 07:16:35 +00:00
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
e3ab70f204 Populate hiddenAPI structure even when not active am: 001e606e5c am: 251bb0cfaf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707568

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

Change-Id: I70daf119a679f01ac216b482fa95f6b21c1a64da
2021-05-14 06:25:17 +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
Colin Cross
58dd6a92e5 Add order-only dependency on shared libraries
Improve the dependency accuracy by adding an order-only dependency
on the shared library alongside the existing depenency on the
table of contents file.  The dependency won't cause the module
to be rebuilt when the the shared library changes, but will allow
anything using the ninja graph for sandboxing to know the dependency
exists.

Test: manual
Change-Id: I3accbcabee62fa0ad3eb3d1aaedc5a4bffe27308
2021-05-13 18:01:24 -07: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
f2f04e4160 Merge "syntax check to jacoco filters for any build" am: 0589914135 am: 6b968b9531
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1706576

Change-Id: Iaceecc8c587231aa3bed8b7f661c1ebfc2abc8df
2021-05-13 23:59:44 +00: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
Treehugger Robot
7a89365bc1 Merge "Soong: check if lndk is needed for apex build" am: ef0439d969 am: 2a4deaaf6d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705069

Change-Id: Ifc23f4e83420bf639556589d6ba3d4dbc04c778a
2021-05-13 23:15:02 +00:00
Yuntao Xu
0589914135 Merge "syntax check to jacoco filters for any build" 2021-05-13 23:11:48 +00:00
Paul Duffin
58fcebb1a7 Add java_sdk_library in bootclasspath_fragment contents to sdk am: a10bd3c127 am: 94a452c768
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705470

Change-Id: I611119b71b2087c37250968024278ce938cfe04a
2021-05-13 23:05:14 +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