Commit graph

50583 commits

Author SHA1 Message Date
Sorin Basca
61c6eef064 Merge "Strip annotations from library stubs" 2022-05-11 13:46:25 +00:00
Anton Hansson
b82b392423 Merge "Use lint database from api_versions_public" 2022-05-11 08:11:45 +00:00
Sorin Basca
69f4b082b9 Strip annotations from library stubs
Bug: 222743634
Test: m
Change-Id: Ic44bd7c4c163b723295eb369664432d3651b8597
2022-05-10 19:41:59 +01:00
Spandan Das
f923333a93 Merge changes Ie8881b85,I6c064f8a
* changes:
  Enforce updatable=true on apps of updatable apexes
  Update sdk_version check for jni_libs of updatable apps
2022-05-10 18:20:27 +00:00
Chih-hung Hsieh
c275b81fc7 Merge "no out/soong/... in default header-filter" 2022-05-10 17:43:16 +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
Chih-Hung Hsieh
5fe637aadb no out/soong/... in default header-filter
* There are too many warnings from out/.../*.pb.h
  and other generated header files.

Bug: 180862582
Bug: 231245501
Test: WITH_TIDY=1 make
Change-Id: Ibabc1040666b50c6dec4fd66ae999a3441324fbd
2022-05-10 01:27:42 -07: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
Spandan Das
42e89508ee Enforce updatable=true on apps of updatable apexes
- Update apex_info (a topdown mutator) so that it sets updatable=true on
  apps of updatable apexes
- Write a unit test that tests different combinations of
  updatable/non-updatable apks-in-apexes
- Update an existing unit test that asserts a different error

Test: go test ./java
Test: m nothing (in internal)
Bug: 209409604

Change-Id: Ie8881b857afcec44addf27fc360c5b8abf726bd2
2022-05-10 00:01:34 +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
67cf60e7c5 Use lint database from api_versions_public
These two databases are (nearly) identical but the latter is generated
in a much more efficient way.

The diffs are very minor and it's not clear to me which versions is more
correct than the other, though I'm fairly confident they don't matter.

https://paste.googleplex.com/5567994005553152

Bug: 187398174
Test: diff api-versions.xml
Change-Id: I0fa35d4067bc06936b4a31bda0bca7fd41f26aae
2022-05-09 13:10:24 +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
Spandan Das
2e8c044b2c Update sdk_version check for jni_libs of updatable apps
With aosp/1640364, all variants of a cc_* module use min_sdk_version as
the version part of the clang triple. Therefore, checking
min_sdk_version of jni_libs should be sufficient to ensure that there is
no unintended access to symbols in newer Android versions

Test: go test ./java
Test: TH
Bug: 155209650
Bug: 209409604

Change-Id: I6c064f8a6ea12c8aa40165a9063380306a180c9b
2022-05-08 01:26:58 +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