Commit graph

50558 commits

Author SHA1 Message Date
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
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
Paul Duffin
0038a8d374 Prevent non-app/non-test modules from statically including jacocoagent
(cherry picked from commit 3953153c9e)

Previously, the .impl library of java_sdk_library modules would end up
with the jacocoagent statically included. That is because their
Instrument flag was set to true when created by their parent. As that
was before the deps were added that meant that they ended up with a
static dependency on jacoagent (at least when UnbundledBuild() was
true).

That was not previously a problem because the .impl files were only
used at build time. However, a recent change to make updatable-media
statically include framework-media.impl (which statically included the
jacocoagent classes) broke the coverage build because the jacocoagent
classes are not in the permitted packages for the updatable-media.

When instrumenting the bootclasspath the jacocoagent library is added
to the art-bootclasspath-fragment.

The jacocoagent should only be statically included in apps, or test
apps. This change adds an extra flag to specify whether the module type
supports statically including the jacocoagent. This is set to true by
apps and test apps but not when the java_sdk_library creates the .impl
java_library preventing it from statically including jacocoagent.

Bug: 230967146
Bug: 229932396
Test: COVERAGE_MODULES=media \
      PRODUCT=mainline_modules_x86 \
      TARGET_BUILD_APPS=com.google.android.media \
      vendor/google/build/build_unbundled_coverage_mainline_module.sh
      # Fails without this change, passes with it.
Merged-In: Ic95cf11a05f59b67e623474ed3dd9be6b4442c42
Change-Id: Ic95cf11a05f59b67e623474ed3dd9be6b4442c42
2022-05-03 10:11:59 +00:00
Treehugger Robot
a0bab18a47 Merge "Clean up minSdkVersionAllowlist" 2022-05-03 09:00:15 +00:00
Treehugger Robot
a6fcf9fd92 Merge "Remove unused uses_sdks property for apexes" 2022-05-03 03:24:59 +00:00
Treehugger Robot
7f5b4e3229 Merge "Remove version_selector mutator" 2022-05-03 03:06:57 +00:00
Treehugger Robot
6c59cdb5c7 Merge "Add missing dependency on compose plugin in kapt rules" 2022-05-03 02:28:14 +00:00
Tianyu Jiang
5ae0cd2a38 Merge "Revert "Update to clang-r450784e"" 2022-05-02 23:14:38 +00:00
Tianyu Jiang
cc84ca767d Revert "Update to clang-r450784e"
Revert submission 2080443-update-clang-8508608

Reason for revert: b/230930120
Reverted Changes:
I678829f02:Update to clang-r450784e

Change-Id: I89e336ec1deffddbbbf872a3ee4a1082a65fb137
2022-05-02 23:06:49 +00:00
Colin Cross
08b0a1cd79 Add missing dependency on compose plugin in kapt rules
The kapt rule uses kotlincFlags but was not using kotlincDeps,
causing the rule to get the -Xplugin argument on the compose
compiler plugin jar, but not have a dependency on it.

Bug: 231222079
Test: TestKotlinCompose
Change-Id: I4c2cf30fb7d8cad4eededa29f67f4ffd459caa41
2022-05-02 14:00:50 -07:00
Treehugger Robot
5b70a8d677 Merge "Update clang version to clang-r450784d" 2022-05-02 18:33:32 +00:00
Yi Kong
4f6c92765d Update clang version to clang-r450784d
Test: presubmit
Bug: 219872355
Change-Id: If6c2c331044a363cb8f20a2516da894e72c4b7e7
2022-05-02 23:52:44 +08:00
Martin Geisler
507f9b26d5 Merge "Tell rustc to always use color output" 2022-05-02 13:00:40 +00:00
Jooyung Han
c743039b48 Clean up minSdkVersionAllowlist
These modules have min_sdk_version set. No need to keep them in
allowlist.

Bug: 158059172
Test: m
Change-Id: Id9d3c62f4da941f26212ce69637469d82758c935
2022-05-02 12:38:26 +09:00
Treehugger Robot
a704eb1469 Merge "Update locations of apex bzl files" 2022-04-30 00:20:08 +00:00
Treehugger Robot
b69919c70d Merge "Remove warnings about mismatched types with builtins for stubs." 2022-04-29 22:29:27 +00:00
Cole Faust
5f90da372e Update locations of apex bzl files
Bug: 230893497
Test: ./build/bazel/vendor/google/build_mainline_modules.sh
Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Change-Id: Ib16bece720a9167d02d2ddd8c4f11257634d382b
2022-04-29 13:37:43 -07:00
Mitch Phillips
4e5f9a1521 Remove warnings about mismatched types with builtins for stubs.
Looks like new versions of the toolchain have an error about mismatching
the definitions used in the stubs with the builtin definitions. Since we
don't care about this when building stubs, ignore it by disabling the
builtin definitions.

Bug: N/A
Test: Build platform with ToT LLVM compiler.
Change-Id: I4e449c5fb96d0d5442fd57a7fea02ba69463324b
2022-04-29 13:12:28 -07:00
Cole Faust
7940585cf0 Merge "Convert firstword/lastword to starlark functions instead of index operators" 2022-04-29 18:32:40 +00:00