Commit graph

50575 commits

Author SHA1 Message Date
Sam Delmerico
79985819fe convert java_resources with bp2build
Test: b build --platforms=//build/bazel/platforms:linux_x86
  //external/jarjar:jarjar-binary and try to use on a jar
Change-Id: Id6f4e6937687fd575360fbacaeda55c41922636e
2022-05-10 14:32:52 +00:00
Anton Hansson
4d92d831ca Merge "Support using api-versions.xml from another module" 2022-05-10 13:40:26 +00:00
Anton Hansson
3881e8d7fb Merge "Use merged annotations zip for lint" 2022-05-10 10:31:27 +00:00
Anton Hansson
55c157791e Merge "Write AndroidMk for api-versions.xml module" 2022-05-10 09:39:35 +00:00
Treehugger Robot
b1263eef55 Merge "Support complicated variable references" 2022-05-10 09:05:32 +00:00
Wei Li
8b9c23ec2d Merge "Export attestation file information to provenance metadata of an artifact if its attestation file exists." 2022-05-10 06:14:34 +00:00
Cole Faust
1323877b7e Support complicated variable references
Bug: 226974242
Test: go test
Change-Id: Iaec16f5c498e7c75c9ee5d53d3499efadfba16bc
2022-05-10 05:26:35 +00:00
Cole Faust
85f8fa2c20 Merge "Flatten foreach calls that produce 2d lists" 2022-05-10 05:26:03 +00:00
Chih-hung Hsieh
63d5ba23ea Merge "Disable performance-no-int-to-ptr in global default" 2022-05-10 05:17:29 +00:00
Treehugger Robot
5554b0e276 Merge "Reland "Update to clang-r450784e"" 2022-05-10 02:46:52 +00:00
Wei Li
b68b3675fd Export attestation file information to provenance metadata of an artifact if its attestation file exists.
Bug: 231239599
Test: m provenance_metadata
Test: atest --host gen_provenance_metadata_test
Change-Id: I6c53d7713874c9b2fd8a422b030b7c8d23317f5b
2022-05-10 02:24:43 +00:00
Chih-Hung Hsieh
5d46cd396e Disable performance-no-int-to-ptr in global default
* This tidy check is too noisy,
  with more than 5000 cases over many files.

Bug: 218759304
Test: make tidy_soong_subset
Change-Id: I8a4b2589ecafdfcd9c19e8a4d59ce1784d1be694
2022-05-09 16:01:10 -07:00
Stephen Hines
7a2a9967b1 Reland "Update to clang-r450784e"
This reverts commit fbc5effdfd.

Bug: http://b/197965342
Bug: http://b/230930120
Test: m and also test internal targets
Change-Id: I49b2d80ef4191ebb08bb6e80507042ee628c7f09
Merged-In: I49b2d80ef4191ebb08bb6e80507042ee628c7f09
2022-05-09 15:52:10 -07:00
Cole Faust
72374fc628 Flatten foreach calls that produce 2d lists
In make, the result of $(foreach $(x),$(y),$(foreach $(z),(w),a))
is a regular list, but in Starlark it's a list of lists. Flatten
the results of foreach expressions where each element is a list
so that they're regular lists of strings again.

Bug: 226974242
Test: go test
Change-Id: I3210d409aba0d807a5890e341ab1e0c0478f5930
2022-05-09 22:47:34 +00:00
David Brazdil
979ef5bb2a Add binary_test.cc to testSrcs
Bug: 231700648
Test: m
Change-Id: If6161b2475887a6d40547f258ccb360c6d719b7a
2022-05-09 23:11:22 +01:00
David Brazdil
3ac9d2bf23 Fix test compilation error
Bug: 231700648
Test: include 'binary_test.go' in 'cc/Android.bp' and build
Change-Id: Ie09ae5c754753751a450fe8854d5c8743afc2e72
2022-05-09 19:36:04 +01:00
Lukács T. Berki
f2d126b3d8 Merge "Add comments for path_interposer." 2022-05-09 15:48:57 +00:00
Paul Duffin
1b543097ac Merge "For each sdk built generate a JSON file describing its contents" 2022-05-09 13:51:11 +00:00
Anton Hansson
c04a16ef0b Support using api-versions.xml from another module
Metalava has two different flags surrounding api-levels:
- one for generating api-versions.xml to a file
- one for applying api-versions.xml from a file

Previously, soong always applied both of these arguments at the same
time, such that framework-doc-stubs both generated and applied
api-versions.xml.

Add support for using api-versions.xml from another module name as well.

Bug: 187398174
Test: droidstubs_test.go
Change-Id: I8288fe4788336d5d5c60d09d48b00ca111449fba
2022-05-09 12:18:17 +00:00
Anton Hansson
ea17a45c26 Use merged annotations zip for lint
The framework-doc-stubs annotations.zip is no longer the correct
zip to use after b/187397779. It doesn't contain the module annotations.

Test: presubmit
Change-Id: I50e0bcc026c97886a31256e2387632c19d4b287f
2022-05-09 10:26:58 +00:00
Anton Hansson
4bf0080b25 Write AndroidMk for api-versions.xml module
Soong does not write AndroidMk output if the default outputfile is
invalid. The default output file for droidstubs modules is the srcjar,
but not all droidstubs modules have srcjars. Make it also write
AndroidMk entries for droidstubs that only have an api-versions.xml
output.

A similar exception already existed for the api txt files, so use the
same mechanism.

Bug: 187398174
Test: m nothing && grep Android-${TARGET_PRODUCT}.mk
Change-Id: I5cbcf42d877ca166d172b727c0aa2bdf6d9af744
2022-05-09 10:26:58 +00:00
Artur Satayev
b8f3f18c15 Merge "Add support to max-target-s to generate_hiddenapi_lists" 2022-05-09 09:17:01 +00:00
Jooyung Han
8ee3fb12d1 Merge "Clean up minSdkVersionAllowlist" 2022-05-09 03:33:15 +00:00
Chih-hung Hsieh
5181502756 Merge "Reduce tidy checks in org.chromium.arc.mojom" 2022-05-06 23:31:32 +00:00
Chih-hung Hsieh
e7410d933a Merge "Add ALLOW_LOCAL_TIDY_TRUE" 2022-05-06 23:31:26 +00:00
Trevor Radcliffe
2845464d2d Merge "Make isolated true by default for gtest" 2022-05-06 17:11:17 +00:00
Treehugger Robot
a11603a538 Merge "Treat kotlin-annotations the same as kotlin-stdlib" 2022-05-06 17:00:08 +00:00
Lukacs T. Berki
2388f64e76 Add comments for path_interposer.
Test: Presubmits.
Change-Id: I22c08f282019050da1198cce1f92f5d825ee649f
2022-05-06 12:42:05 +02:00
Paul Duffin
c6ba182f3c For each sdk built generate a JSON file describing its contents
Some build scripts need to know information about the contents of an
sdk, such as what APIs it provides (via java_sdk_library). Rather than
duplicate that information in the scripts or attempt to access that
information (where available) by looking at the contents of the
snapshot this change generates a JSON file that sits alongside the
snapshot itself.

The info file can be generated without generating the snapshot zip file
but whenever a snapshot zip file is generated the info is generated
too. The info file sits alongside the zip file in out/mainline-sdks.

Bug: 204763318
Test: m art-module-sdk
      m dist
Change-Id: I289530bb21693dc6443826c24c17c9b5d85d2d8b
2022-05-06 10:17:29 +00:00
Artur Satayev
74cead891e Add support to max-target-s to generate_hiddenapi_lists
Test: make
Bug: 169748350
Change-Id: I2662a643a190ed531d85755d01e1be9c49c02e25
Merged-In: I2662a643a190ed531d85755d01e1be9c49c02e25
2022-05-06 08:59:39 +00:00
Treehugger Robot
beccdcdff2 Merge "Revert "Append APEX version instead of build ID for APK-in-APEX ..."" 2022-05-06 03:17:24 +00:00
Jooyung Han
0ea5277adf Clean up minSdkVersionAllowlist
remove NN modules from the list.

Bug: 158059172
Test: m com.android.neuralnetworks
Change-Id: I40b25a06afd81a8fad44c853cf4ccff41300f87a
2022-05-06 11:06:45 +09:00
Chih-Hung Hsieh
f3efde5e72 Add ALLOW_LOCAL_TIDY_TRUE
Bug: 229779921
Test: presubmit
Change-Id: I9ee65fbb96fc68a949e33b63b83d0609696d76a1
2022-05-05 14:46:34 -07:00
Chih-Hung Hsieh
47e35bbd25 Reduce tidy checks in org.chromium.arc.mojom
Too many warnings from this library.
Treat it the same as tidyExternalVendor projects.

Bug: 231626164
Test: make tidy-vendor-google_arc_subset
Change-Id: Ieaf748517390cb6dfac7e85500666dc9f49ffd52
2022-05-05 14:09:12 -07:00
David Brazdil
08f7eadcee fs: Add raw_binary rule
Raw binaries are used in bare-metal environments such as early boot of
pVMs (protected virtual machines). Add a new target rule called
'raw_binary' which converts an executable to the raw binary format.

Test: m pvmfw
Change-Id: I701b703a0f12df891b714fe29e320914f167cd04
2022-05-05 18:46:39 +01:00
David Brazdil
958c957696 Add linker_scripts property
Add a linker_scripts property that is similar to version_script
but uses a -Wl,--script flag and can be passed multiple times.

Test: TestBinaryLinkerScripts
Change-Id: If405cfbcdaf8e99559414ba759734084fae0f7ec
2022-05-05 16:36:56 +01:00
David Brazdil
3eb5a74a26 Fix typo in installer.go
Test: builds
Change-Id: I51364616e2a16f932d34ef33565d04a00d8f4ca5
2022-05-05 16:36:56 +01:00
Oriol Prieto Gasco
17e2290e9f Revert "Append APEX version instead of build ID for APK-in-APEX ..."
Revert submission 2067907-apk-in-apex

Bug: 230873680

Reason for revert: Change broke aab generation b/230873680
Reverted Changes:
I9cef1418c:Append APEX version instead of build ID for APK-in...
Ic37eeba8b:Make apexer replace instances of version placehold...

Change-Id: Ib113d56901e815435f71bf878049cdabd210503c
2022-05-05 14:32:37 +00:00
Colin Cross
063544747e Treat kotlin-annotations the same as kotlin-stdlib
Upgrading dagger uncovers an issue where java-only modules with
kotlin-containing dependencies may see org.jetbrains.annotations.NotNull
annotations.  Include the kotlin-annotations in the output jar the
same way kotlin-stdlib is included.

Bug: 227669740
Test: TestKotlin
Change-Id: Ifc33a32b121c1b9a9d1911bdec332264b78b571c
2022-05-04 19:07:32 +00:00
Treehugger Robot
be4c7eda08 Merge "Revert "Don't add uses_libs/optional_uses_libs to the manifest_fixer."" 2022-05-04 15:19:37 +00:00
Lukács T. Berki
28ba9c472f Merge "Add a test for correctness of C++ compilation." 2022-05-04 12:06:38 +00:00
Ulya Trafimovich
f5d91bb3b4 Revert "Don't add uses_libs/optional_uses_libs to the manifest_fixer."
This reverts commit 0b1c70efbc.

The reverted commit was based on the idea that uses-libraries that are
explicitly specified in build files should not be implicitly added to
the manifest, as that would mean that anything added to the build files
will flow to the manifest.

Although this logic is correct, it prevents propagation of
uses-libraries from dependencies, which is wrong: if a library has an
explicit uses-library property in Android.bp, this property is expected
to be propagated to the library's dependencies. Failing to do so would
mean that every user of that library has to add uses-library property to
their build files, which doesn't scale (see b/214255490 for example).

Bug: 214255490
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
    && adb wait-for-device && adb root \
    && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
    # empty output, no errors at boot
Change-Id: I6f420e76a89aa2f37be99f877711736640f2c361
2022-05-04 12:10:06 +01:00
Lukacs T. Berki
e3487c8848 Add a test for correctness of C++ compilation.
This required the following:

- Adding Platform_base_sdk_extension_version to default soong.variables
- Teaching the symlink tree creation code to understand symlinks
- Making finder.go follow symlinks when requested

Adding yet another knob is unfortunate, but I can't allow that
unconditionally because the Android code base contains a number of
symlinks giving rise to infinite directory trees because they point back
to their parent and this seemed preferable to adding complicated logic
like "follow symlink but if only its fully resolved version does not
point under the source tree".

I could be convinced about the latter, though.

Test: Presubmits.
Change-Id: I453f6b7e5334771f5832c700db00f9d24ed1d82f
2022-05-04 09:12:01 +02:00
Ge Bian
d906ddc70a Merge "Revert "Add support to max-target-s to generate_hiddenapi_lists"" 2022-05-03 23:04:00 +00:00
Ge Bian
93b542459a Revert "Add support to max-target-s to generate_hiddenapi_lists"
Revert submission 1931011-max-target-s

Reason for revert: Seems to cause build breakage
Reverted Changes:
I2b513f93a:Add support to max-target-s to generate_hiddenapi_...
Ifdd7b7a71:Add support for max-target-s
I06d05840e:Add support for max-target-s

Change-Id: I67413a3deda42c503b876727377e932f7e4652e9
2022-05-03 20:41:53 +00:00
Mark Dacek
390df4c181 Merge "Log information for Mixed Builds modules. Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0" 2022-05-03 20:04:10 +00:00
Treehugger Robot
dd58c3fe2b Merge "Add cross-referencing support for Rust" 2022-05-03 19:10:17 +00:00
MarkDacek
ff851b83b6 Log information for Mixed Builds modules.
Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw
Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0

Change-Id: I88780c7cc52a189a72216c5e2e499c96574b3731
2022-05-03 18:11:32 +00:00
Artur Satayev
4df5f992e3 Merge "Add support to max-target-s to generate_hiddenapi_lists" 2022-05-03 17:28:38 +00:00
Trevor Radcliffe
cd8fd67753 Make isolated true by default for gtest
This change sets everything up to do this, but does not actually
enable it. jdesprez will follow up by making a one line change
that actually turns the default to true when he does test
debugging/verification.

Bug: 178498003
Test: build. Relying on @jdesprez for the rest of the verification
Change-Id: I3b1b6b57279dd4f9f7fc559e2d3ad76911b045e8
2022-05-03 14:51:16 +00:00