Commit graph

50767 commits

Author SHA1 Message Date
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
Matthew Maurer
e91f9d439e Merge "Allow BoringSSL's Rust bindings to build" 2022-04-29 17:40:24 +00:00
Treehugger Robot
9c60cc4f22 Merge "java_sdk_library_import: Delegate OutputFiles to impl library if needed" 2022-04-29 17:27:23 +00:00
Christopher Parsons
f485a95d3a Merge "Preserve depset structure from bazel aquery" 2022-04-29 14:49:31 +00:00
Paul Duffin
1e940d5b44 java_sdk_library_import: Delegate OutputFiles to impl library if needed
Bug: 230846030
Test: m nothing
      # Cherry pick into build with prebuilts enabled to verify.
Change-Id: I5ac9b1cdd2fc61efbc988e84556202ff6cd57146
2022-04-29 14:42:04 +01:00
Paul Duffin
a09d95f605 Merge "hiddenapi: Prevent libraries for Q/R from include S+ flags." 2022-04-29 13:37:35 +00:00
Martin Geisler
d352e3b788 Tell rustc to always use color output
By default, rustc will disable color output when it detects that its
stdin isn’t connected to a terminal. However, since we will print the
output to the user’s terminal, it makes sense to override this.

Test: Manually by triggering a compilation error. I ran
  * m pdl
  * atest --host --no-bazel-mode pdl_inline_tests
  * atest pdl_inline_tests
  and got useful color output in my terminal in each case.
Change-Id: I8b593d2eb59d13db17a3456e3fb053556fc16f07
2022-04-29 15:21:15 +02:00
Victor Chang
99666e2720 Merge "Revert "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" 2022-04-29 10:34:41 +00:00
Nataniel Borges
5d80d895b6 Revert "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"
This reverts commit 8b7f627f30.

Reason for revert: b/230821289

Change-Id: I3032103b174c78586b38b64d2748ec5a42fa9522
2022-04-29 09:49:16 +00:00
Treehugger Robot
2fe7af01af Merge "Fix crash in MakeString.EndsWith()" 2022-04-29 08:18:05 +00:00
Jooyung Han
fbcf7e1c91 Merge "Put rust_test.data_libs under lib[64]" 2022-04-29 04:00:13 +00:00
Treehugger Robot
979a64f810 Merge "Clean up min_sdk_version allowlist" 2022-04-29 02:22:24 +00:00
Vinh Tran
775b44fa50 Merge "bp2build converts java_version property to javacopts attribute" 2022-04-29 01:43:20 +00:00
Treehugger Robot
28881cbd55 Merge "Update to clang-r450784e" 2022-04-29 01:00:33 +00:00
Cole Faust
01624a9c33 Merge "Show load cycles when running mk2rbc" 2022-04-29 00:44:12 +00:00
Cole Faust
2b6a312662 Merge "Recognize some unsupported functions" 2022-04-29 00:41:15 +00:00
Jooyung Han
10bea7d44a Put rust_test.data_libs under lib[64]
Rust test binary depending on native libraries would require them under
lib[64] directory so that the test binary can open them with default
rpath values.

Bug: 204562227
Test: presubmit
Change-Id: I029bb32c4c98fba21bd28e579a9df9f184a7f045
2022-04-28 23:55:43 +00:00
Cole Faust
35b994e1e7 Fix crash in MakeString.EndsWith()
Bug: 226974242
Test: go test
Change-Id: I21ff26d00ed7be145ae2c1175f1438b6e7d60834
2022-04-28 16:08:02 -07:00
Vinh Tran
3ac6daf47c bp2build converts java_version property to javacopts attribute
This CL also converts `external/rappor` (which already set `java_version` to `1.7`) to be bazelable to testify the changes.

Results from `b build //external/rappor && cat bazel-bin/external/rappor/librappor.jar-0.params`: https://paste.googleplex.com/5518725462622208.

Test: go test ./bp2build/...
Bug: 227618664
Change-Id: I8d370d4639f70fba51e6de6ceb7bcb5ace9ccd91
2022-04-28 18:52:48 -04:00
Treehugger Robot
184a6b87e5 Merge "Prototype changes for multitree" 2022-04-28 22:20:47 +00:00
Treehugger Robot
f8c3412822 Merge "Convert $(words) to Starlark" 2022-04-28 22:18:07 +00:00
Treehugger Robot
ff22afa704 Merge "Use --dependency-file when linking elf files." 2022-04-28 22:14:54 +00:00
Paul Duffin
fb14b52747 Merge "Allow framework-media to build the framework-media.impl" 2022-04-28 21:10:16 +00:00
Cole Faust
16bb2d044d Merge "Allow seeing include $(x) when there is an include_top comment" 2022-04-28 20:49:17 +00:00
Treehugger Robot
e8f19f3dd7 Merge "Convert includes/inherits inside evals" 2022-04-28 20:43:29 +00:00
Kousik Kumar
4e3c26602f Merge "Add a warning message about missing gcert at the end of the build" 2022-04-28 19:55:30 +00:00
Cole Faust
1a3e5effa8 Merge "Allow comparing $(wildcard) results to non-empty values" 2022-04-28 19:54:32 +00:00
Narayan Kamath
ad0ec2ae1f Add support to max-target-s to generate_hiddenapi_lists
Test: make
Bug: 169748350
Change-Id: I2b513f93a509bc1163b114d399895cbe9486817e
2022-04-28 18:34:58 +01:00
Paul Duffin
09817d66de hiddenapi: Prevent libraries for Q/R from include S+ flags.
The Q and R runtimes can handle Q/R flags but not S flags. So, this
change verifies that any library that can run on Q/R
(min_sdk_version <= R) by adding --max-hiddenapi-level=max-target-r
to the "hiddenapi encode" command. That will cause a failure if any
S+ flags are found in the flags to encode.

Bug: 172453495
Test: m droid && launch_cvd
      Cherry pick changes in https://r.android.com/q/topic:max-target-s
      Add @UnsupportedAppUsage maxTargetSdk=S in classes in framework-permission (for r/q)
      and framework-permission-s (nominally for S+). I had to incresed the min_sdk_version
      in the latter to 31 (S) as it was still set at 30 (R).
Change-Id: Ie0f68482603adc7b4e3d7a5c81bf203d81a84a9e
2022-04-28 18:34:48 +01:00
Treehugger Robot
f7fa021b65 Merge "Set the dist dir for musl targets of build_version_test" 2022-04-28 16:51:24 +00:00
Chris Parsons
1a7aca075b Preserve depset structure from bazel aquery
Each depset now corresponds to a phony rule which depends on other
depsets or on full paths; thus, bazel's depset structure is preserved in
the form of phony rules of name bazel_depset_{id}.

Previously, flattening and recopying large lists of file path strings
was quite inefficient. This was particularly evident as we enumerated
hundreds of clang headers for each cc compile action.

This reduces soong_build analysis time by about 30% for mixed builds.
It also reduces ninja file size by ~750MB.

Fixes: 229405615
Test: Unit tests, manually verified metrics, mixed_droid CI

Change-Id: I78df152ac1488ae0c6807afdde4b4ad5e6d26287
2022-04-28 12:44:28 -04:00
Treehugger Robot
1b60bb4fe1 Merge "Correctly serialize class loader context for "any" SDK version to JSON." 2022-04-28 15:46:04 +00:00
Paul Duffin
77590a8263 Allow framework-media to build the framework-media.impl
The framework-media java_sdk_library is currently api_only for legacy
reasons. This change allows it to also build the framework-media.impl
library by making the following changes:
* Adds impl_only_static_libs to allow the implementation to statically
  include other libraries, something no other java_sdk_library has
  needed to do.
* Passes the apex_availability property through to the impl library so
  it can be statically included in the updatable-media which is what is
  included in the apex, again for legacy reasons.

Bug: 190807367
Bug: 229932396
Test: m com.android.media media-module-sdk
      # Compare before and after this change (and corresponding change
      # to updatable-media/framework-media.
Change-Id: I9e1837edcca6f5fa84fc611274cf8fbba8a896b8
2022-04-28 14:30:14 +00:00
Oriol Prieto Gasco
eda12cb250 Set the dist dir for musl targets of build_version_test
Bug: 230604501
Test: build/soong/soong_ui.bash --make-mode apexer_tools static_apexer_tools dist BUILD_HOST_static=1 USE_HOST_MUSL=true
Change-Id: I29b7f4c16346e39b89f099eecf816d9811a7b587
Merged-In: I29b7f4c16346e39b89f099eecf816d9811a7b587
2022-04-28 14:18:59 +00:00
Treehugger Robot
d5a57a5679 Merge "Replace DEX_FLAGS by flags for D8 and R8." 2022-04-28 12:40:13 +00:00
Ulya Trafimovich
91f015e73e Correctly serialize class loader context for "any" SDK version to JSON.
Previously "any" was serialized as its numeric value, 10000. But other
code in makefiles and scripts expects string "any", and dexpreopt.config
files generated by Make (for Android.mk modules) have "any" not 10000.

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: Id5e80eb8a90d9786b5cb999c172aaecb44952f76
2022-04-28 13:22:52 +01:00
Ulya Trofimovich
a465e28bcb Merge "Remove obsolete dexpreopt config option UseArtImage." 2022-04-28 09:44:21 +00:00
Inseob Kim
5eb7ee9fad Prototype changes for multitree
This change contains a prototype implementation for multitree. Several
interfaces and modules are added.

1. Imported/Exported
Modules implementing Exportable interface can export artifacts to other
components. "imported_filegroup" modules can import generated artifacts from other exported modules.

2. Multitree metadata
It contains information about imported/exported modules in each
component, and can be generated via "m update-meta".

3. cc library stub
It's based on prototype stub libraries. It uses imported/exported
mechanism to expose a C API, with a map.txt file and header files.

Bug: 230448564
Test: m
Change-Id: Id7ff7618e2c630c5617a564d8b23b60a1cc9c8e8
2022-04-28 08:20:10 +00:00
Pirama Arumuga Nainar
525589f40a Update to clang-r450784e
Bug: http://b/197965342

This respin contains lld without two reverts.

Test: presubmit
Change-Id: I678829f02a6b255972b1cc7bde27d114cb272d1d
2022-04-27 23:22:40 -07:00
Cole Faust
5a13aaf112 Convert firstword/lastword to starlark functions instead of index operators
firstword/lastword need to be able to give an empty string when
the input is empty, which the indexing operator can't do.

Bug: 226974242
Test: go test
Change-Id: I44162a258297b32ec27e7acfb1fa06223391dcc6
2022-04-27 17:49:35 -07:00
Cole Faust
da9770eb67 Show load cycles when running mk2rbc
Previously, if there was a cycle of load statements,
mk2rbc would exit with status code 1 but not give
any message indicating what went wrong.

Bug: 226974242
Test: Manually
Change-Id: I7d30cad08bd3abcd761b5f28a63a2cc66b45e805
2022-04-27 15:13:47 -07:00
Treehugger Robot
fcf0b686aa Merge "Fix erroneous "Field requires API level 33 (current min is 32)" warnings" 2022-04-27 22:10:36 +00:00
Matthew Maurer
14f26aaa4e Allow BoringSSL's Rust bindings to build
Bug: 177080016
Test: mm in boringssl
Change-Id: I3cdf031ebf7c5bafce00c078107fd7fb3a26ba2d
2022-04-27 14:28:43 -07:00
Cole Faust
8b7f627f30 Fix erroneous "Field requires API level 33 (current min is 32)" warnings
Bug: 215567981
Bug: 204776549
Test: m out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/lint/lint-report.xml, then check that that file doesn't have any of these warnings
Change-Id: I39aa2228474630c93250bf5833ac6bd9bbadcc7f
2022-04-27 12:20:08 -07:00
Kousik Kumar
b018b83664 Add a warning message about missing gcert at the end of the build
Now that we are ready to rollout gcert, adding a warning that builds
will fail if gcert doesn't exist. Doing this only for builds with
ANDROID_BUILD_ENVIRONMENT_CONFIG=googler.

Test: Ran a build without gcert and USE_RBE=true and it printed the
warning.
Bug: b/229743321

Change-Id: I616a4a534ab277873ac7e19baecb78620f07854c
2022-04-27 15:16:41 -04:00
Trevor Radcliffe
4dc57a6d7b Merge "Refactor cc/bp2build.go to use parse helper" 2022-04-27 18:40:00 +00:00