Commit graph

51945 commits

Author SHA1 Message Date
Treehugger Robot
69f5b684d4 Merge "Promote ExtraText lint warning to an error" 2022-08-10 00:01:46 +00:00
Treehugger Robot
8c9a3f2596 Merge "Add libapexutil to denylist" 2022-08-09 20:36:26 +00:00
Cory Barker
285112d3fc Merge "Revert^2 "Update the way we build AFL++ fuzz binaries"" 2022-08-09 19:49:04 +00:00
Sasha Smundak
8df2a5c2fb Go extractor should succeed
Test: treehugger
Fixes: 241561896
Change-Id: I182ae375be33f355275d1c2fd54e2cb1ac913354
2022-08-09 17:55:47 +00:00
Romain Jobredeaux
aaf4f5ec8a Merge "Bp2Build converter for android_library_import and android_library." 2022-08-09 17:46:59 +00:00
Liz Kammer
6a824f6027 Add libapexutil to denylist
Depends on unconverted module apex-info-list-tinyxml

Test: ci
Test: b build //system/...
Change-Id: I56cba9aa193d7285d49a3fba92b07bb92241aad0
2022-08-09 13:26:23 -04:00
Cole Faust
7868b9e942 Promote ExtraText lint warning to an error
It was previously demoted due to preexisting occurances
of it in the tree, but those have all been removed now.

Bug: 236431222
Test: m lint-check
Change-Id: Ic3501c43a09b10bc8a2944b0caa6ebbec663a008
2022-08-09 09:51:44 -07:00
Liz Kammer
3d13adc9d1 Denylist test_fips because it depends on adb
Test: CI
Test: b build //external/boringssl/...
Change-Id: I278b8229cea347acef2edd9e56e2f0853f7780e0
2022-08-09 09:26:54 -04:00
Treehugger Robot
68572c83bf Merge "update bp2build tests for cc_yasm + add to CI" 2022-08-09 01:49:37 +00:00
Treehugger Robot
c120ab33bc Merge "bp2build special case for libcrypto_for_testing" 2022-08-09 01:21:37 +00:00
Krzysztof Kosiński
0b4bd22b6f Merge "Globally force -Wdeprecated-declarations to be a warning." 2022-08-09 00:45:26 +00:00
Cory Barker
9cfcf6d4e9 Revert^2 "Update the way we build AFL++ fuzz binaries"
Test: Built AFL fuzzers individually and built all using haiku command
and built libfuzzers individually and also by using haiku command. Ran
selected fuzzers manually to ensure fuzzing still worked.

Description: Previously we needed to add cc_afl_fuzz to build an afl fuzz binary,
however, to turn current libFuzzers into AFL fuzzers this would required
an update to each Android.bp file which is a lot of work, and would also
require an approval from each Android.bp file owner, which is even more
work.

To get around this (and also to match how AFL fuzzers are built in G3)
we will build AFL++ fuzz binaries by command line option FUZZ_FRAMEWORK.
When FUZZ_FRAMEWORK=AFL is set, all cc_fuzz modules will be built
for AFL rather than libFuzzer. Devs can also specify if a cc_fuzz module
is only for libFuzzer or AFL by using fuzzing_frameworks. If
fuzzing_frameworks is left blank then it will be assumed that the
cc_fuzz module can be built for all available fuzzing frameworks.

Change-Id: If57d3038f05e52775177eaeb26f8ed2bdc73443a
2022-08-08 20:26:09 +00:00
Treehugger Robot
f48643dc55 Merge "Increase R8 max heap size to 4GB." 2022-08-08 18:08:16 +00:00
Sam Delmerico
fae47f9522 bp2build special case for libcrypto_for_testing
A new module libcrypto_for_testing was added that uses the
inject_bssl_hash property, but this property is currently only available
for the libcrypto module specifically.

Test: CI
Change-Id: I1b83de02a2990b7503980bf6a85611683427baf9
2022-08-08 13:35:08 -04:00
Cory Barker
ba73a0997d Merge "Revert "Updated the way we build AFL++ fuzz binaries"" 2022-08-08 16:37:28 +00:00
Cory Barker
74aea6c5ee Revert "Updated the way we build AFL++ fuzz binaries"
Revert submission 2164482-Build AFL from Command line option

Reason for revert: Unit test fails on MAC builds
Reverted Changes:
Ia7a822462:Updated the way we build AFL++ fuzz binaries
I994bde63b:Updated the way we build AFL++ fuzz binaries
Ie863853b4:Updated the way we build AFL++ fuzz binaries
I577d6ae7b:Updated the way we build AFL++ fuzz binaries
Ic4fd34f8d:Updated the way we build AFL++ fuzz binaries

Change-Id: Ic2cda7733d206d7ed178f1db5e38268bc915e57b
2022-08-08 15:55:12 +00:00
Romain Jobredeaux
c9b2bba3cd Bp2Build converter for android_library_import and android_library.
Minor refactor of android_app converted to account for common attributes
between library and app.

Test: go test
Test: ../bazel/ci/bp2build.sh
Change-Id: I60b06eef6d2b9bc2d91f8b83522747ebbe76bbb6
Bug: 215230093
Bug: 215230095
2022-08-08 11:23:02 -04:00
Sam Delmerico
c9a49dff90 update bp2build tests for cc_yasm + add to CI
This test got missed in the change to export the bp2build testing
functionality because it wasn't listed in the Android.bp file to be run
as tests in CI.

Test: go test ./bp2build
Change-Id: Ic8f16bb0d5d75084592caa4ea3018384c1c7a30c
2022-08-08 10:52:27 -04:00
Cory Barker
edadcdb17c Merge "Updated the way we build AFL++ fuzz binaries" 2022-08-08 14:24:16 +00:00
Treehugger Robot
8e77db3b36 Merge "Clean up android/module.go" 2022-08-08 11:43:36 +00:00
Jordan Demeulenaere
c33f79996f Increase R8 max heap size to 4GB.
Bug: 241220562
Test: Manual
Change-Id: I983ded61b3a588e3d3b5c8e71596f80aaa2d59e6
2022-08-08 11:40:15 +02:00
Krzysztof Kosiński
6934b0ee64 Globally force -Wdeprecated-declarations to be a warning.
Some code compiles with -Werror, which makes it very hard to mark
anything as deprecated without breaking the build. This option
will ensure that we can still mark things as deprecated without
breaking such code. Among other things, this will allow us to
undo a local change to protobuf which disables deprecation
warnings.

Bug: 203713560
Test: presubmit
Change-Id: I718de31c3ff685dba4104f3c9e7bd5d169d89f7e
2022-08-07 07:00:41 +00:00
Treehugger Robot
bfe0342e73 Merge changes I70159a49,I1809c0fc
* changes:
  bp2build: Allowlist and build fastboot with Bazel.
  bp2build: Allowlist //external/toybox.
2022-08-06 07:14:13 +00:00
Spandan Das
0264058aea Merge "Set targetSdkVersion to 10000 for MTS tests targeting current" 2022-08-05 22:52:27 +00:00
Cory Barker
cecb7546db Updated the way we build AFL++ fuzz binaries
Test: Built AFL fuzzers individually and built all using haiku command
and built libfuzzers individually and also by using haiku command. Ran
selected fuzzers manually to ensure fuzzing still worked.

Description: Previously we needed to add cc_afl_fuzz to build an afl fuzz binary,
however, to turn current libFuzzers into AFL fuzzers this would required
an update to each Android.bp file which is a lot of work, and would also
require an approval from each Android.bp file owner, which is even more
work.

To get around this (and also to match how AFL fuzzers are built in G3)
we will build AFL++ fuzz binaries by command line option FUZZ_FRAMEWORK.
When FUZZ_FRAMEWORK=AFL is set, all cc_fuzz modules will be built
for AFL rather than libFuzzer. Devs can also specify if a cc_fuzz module
is only for libFuzzer or AFL by using fuzzing_frameworks. If
fuzzing_frameworks is left blank then it will be assumed that the
cc_fuzz module can be built for all available fuzzing frameworks.

Change-Id: Ia7a8224627f2de61606b410d1d1a56d7bdc0955f
2022-08-05 21:46:26 +00:00
Spandan Das
6b7c1dbf88 Merge "Spellcheck" 2022-08-05 20:56:02 +00:00
Treehugger Robot
39291b9682 Merge "Show module's type and path when reporting dependency problems" 2022-08-05 19:44:11 +00:00
Treehugger Robot
ab8581a1f8 Merge "Fix invalid json when product variables have quotes" 2022-08-05 19:20:12 +00:00
Spandan Das
a5f39a12de Spellcheck
This should fix a spelling error that crept in during a documentation CL

Test: N/A
Change-Id: I085f7fd1399f06e3b8808ed54963abce0e06f7fe
2022-08-05 02:36:36 +00:00
Remi NGUYEN VAN
439fbfc25f Merge "Make ignorewarnings optional in optimize" 2022-08-05 01:24:57 +00:00
Cole Faust
082c5f31cc Fix invalid json when product variables have quotes
Go's json encoder will escape quotes with backslashes.
But we put the encoded json into a Starlark string
literal, which will evaluate the \" into just a regular
quote, so they won't be escaped when the json.parse()
gets to them.

Escape all backslashes so this doesn't happen.

Test: lunch sdk_phone_x86_64-userdebug; b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Change-Id: I473e6c42968fcf73d47dec61670956a7ac9a6c88
2022-08-04 15:51:58 -07:00
Sasha Smundak
e198eafaf6 Clean up android/module.go
Test: treehugger
Change-Id: I41973dfc6805009d44323f3f1a89f923abf39c79
2022-08-04 15:49:11 -07:00
Sasha Smundak
f2bb26f492 Show module's type and path when reporting dependency problems
Test: treehugger
Change-Id: I25c3eddbeeb10bd6b9bfa9e869f6fbc98d2a6ec4
2022-08-04 14:49:25 -07:00
Spandan Das
9f7ae7f565 Set targetSdkVersion to 10000 for MTS tests targeting current
MTS tests built on unstable branches (e.g. git_master) should be testable on
old system images (e.g. S). However, they run into an error during installation
on older images:
`Requires development platform $<current_codename>, but this is a
release platform`

This CL fixes this issue by updating the target_sdk_version of MTS test apps
targeting current to the magical sdk_version 10000

Bug: 227473065
Test: go build ./java
Test: TH
Change-Id: Ic0358a48a19dc239defbb4ee8ec99225cce75584
2022-08-04 21:23:14 +00:00
Liz Kammer
3a0355f99c Merge "export common bp2build testing functions" 2022-08-04 18:11:16 +00:00
Jingwen Chen
9009dc2d8f bp2build: Allowlist and build fastboot with Bazel.
Test: $ b build //system/core/fastboot:fastboot --config=linux_x86_64 &&
bazel-bin/system/core/fastboot/fastboot --help

Change-Id: I70159a49e7fdfbb8a0b653161e9ea2a9eeeab977
2022-08-04 15:26:46 +00:00
Jingwen Chen
5012e07bae bp2build: Allowlist //external/toybox.
Test: $ b build //external/toybox:toybox --config=linux_x86_64 && bazel-bin/external/toybox/toybox ls
Change-Id: I1809c0fcc3ae4a1965ee4bff0653266f9f64f23f
2022-08-04 15:04:43 +00:00
Alexei Nicoara
075571b5e7 Merge "Overriding placeholder version in updatable apks" 2022-08-04 08:28:16 +00:00
Remi NGUYEN VAN
bdad314f97 Make ignorewarnings optional in optimize
This allows targets to opt-in to running R8 without the -ignorewarnings
flag. Ignored warnings can cause code to be optimized incorrectly, so
this makes the build safer for such targets.

Ideally ignore_warnings should default to false, but all targets need to
be fixed for that to happen. As a first step, provide a mechanism for
individual targets to ensure they do not introduce regressions.

Bug: 229727645
Bug: 180878971
Bug: 226127213
Bug: 239990030
Test: m (runs dex_test)
Change-Id: Ic0eef29598c1ee47e958da8a5048d9696165a235
2022-08-04 13:23:47 +09:00
Alexander Smundak
fe57ecfdef Merge changes Id3de4ede,Iae326016
* changes:
  Consolidate Bazel conversion state into a single field in CommonProperties
  Index Go code in the build/make/tools
2022-08-04 02:34:17 +00:00
Jooyung Han
113bd15013 Merge "Allow libwifi-hal to use makefile_goal" 2022-08-03 22:40:43 +00:00
Cole Faust
7071a05c93 bp2build support for .asm files
Bug: 233948256
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I387c2aeb36df004f0e1838a08a4f28b38503d6ed
2022-08-03 13:34:15 -07:00
Sasha Smundak
a095406411 Consolidate Bazel conversion state into a single field in CommonProperties
Bazel conversion state needs to be cloned during module cloning, so it
should be registered via module.AddProperties. Until now it was done
implicitly as the modules converted so far added the whole
base.commonProperties field (and thus transitively all its subfields).
However, adding CommonProperties also adds its fields to the list of
the module's attributes, which is undesirable. The problem surfaced
while implementing Bazel conversion to the `license` rule.

Bug: 190817312
Test: treehugger
Change-Id: Id3de4ede8df81b21f00065a3a1bdc2d707391c3a
2022-08-03 10:46:19 -07:00
Sasha Smundak
08253a0901 Index Go code in the build/make/tools
Test: manual
Change-Id: Iae326016074cbed8b83940dd188ca1171cc4d696
2022-08-03 10:46:19 -07:00
Sam Delmerico
c31778ffbc Merge "add java_import to mixed build" 2022-08-03 17:13:06 +00:00
Sam Delmerico
fb845984df Merge "copy JNI from AAR files to android_app APK" 2022-08-03 13:12:03 +00:00
Alexei Nicoara
69cf0f3756 Overriding placeholder version in updatable apks
Test: presubmit, checked the app version after build locally
Bug: 231691162
Change-Id: Icd242432540ea424235b226a45aac839dbc995be
2022-08-03 12:05:14 +01:00
Jooyung Han
39cadf9f06 Allow libwifi-hal to use makefile_goal
To migrate libwifi-hal from make to soong, its dependencis
(libwifi-hal-<vendor>) are wrapped in makefile_goal until they are
migrated to soong as well.

Bug: 239984067
Test: m
Merged-In: Icb09ef1bf40311498db04b7358634eadd0fed5fa
Change-Id: Icb09ef1bf40311498db04b7358634eadd0fed5fa
(cherry picked from commit f9392095d7e6f065310ab7662bb34897295f7d9f)
2022-08-03 17:47:25 +09:00
Mu-Le Lee
950f28abe2 Merge "Diff source dump and current version dump for Cross-Version ABI Check" 2022-08-03 03:52:38 +00:00
Hamzeh Zawawy
f79bfe8b03 Merge "Fixing issue with boolean params in cc_fuzz" 2022-08-03 00:09:04 +00:00