Commit graph

58303 commits

Author SHA1 Message Date
Sam Delmerico
43c0eb17ae Merge "add jacocoagent by default to Java modules" 2022-09-12 13:32:09 +00:00
Alix Espino
c0cca3f4e1 Merge changes I82d3a384,I3b03f0a3
* changes:
  product_variables srcs in prebuilt_etc
  refactoring build_conversion.go to remove panic
2022-09-12 13:31:46 +00:00
Jingwen Chen
3c0c2db93a Merge "Allowlist more modules under the adb package." 2022-09-12 04:52:20 +00:00
Treehugger Robot
797aa42e28 Merge "Don't close file descriptors when starting python program" 2022-09-10 00:54:48 +00:00
Treehugger Robot
c4fe27e907 Merge "[memtag-stack] work around stack limit in lld" 2022-09-09 23:38:06 +00:00
Vinh Tran
c3d86d6bf0 Merge "Convert aidl.export_aidl_headers in cc library to Bazel" 2022-09-09 22:26:41 +00:00
Sam Delmerico
df96fdd5b6 Merge "Revert "Revert "add bazel AIDL examples to bp2build""" 2022-09-09 21:38:33 +00:00
Florian Mayer
f79b210ddf [memtag-stack] work around stack limit in lld
Change-Id: Iee4a5ba9f9789f684d78e232078e36898e0c16d9
2022-09-09 14:24:11 -07:00
Alix
bbfd538326 product_variables srcs in prebuilt_etc
bp2build conversion handles product_variable srcs

bug: 228353067
Test: prebuilt_etc_conversion_test.go
Change-Id: I82d3a384ee14d4e981d502dd9eb824c87d5ae2c7
2022-09-09 20:52:09 +00:00
Sam Delmerico
1e3f78f866 add jacocoagent by default to Java modules
On coverage builds, R8 will fail to properly optimize and fail the build
if ignore_warnings: false, because jacoco injects dependencies on
jacocoagent classes, but the jacocoagent library is not part of the
classpath libraries passed in to R8 in its arguments.

Instead we can add jacocoagent as a libs dependency for these modules so
that it will get pulled into the r8 flags.

Bug: 243903417
Test: m
Change-Id: Icc24cc260b896fc800125a0318308d823ccf7a83
2022-09-09 16:50:38 -04:00
Alix
94e2603ab7 refactoring build_conversion.go to remove panic
Returning errors throughout instead of calling panic()
Errors will be more useful for testing

Test: bp2build tests
Change-Id: I3b03f0a30e7a80878e91c7f0e2df5a94d9d6b780
2022-09-09 20:25:51 +00:00
Vinh Tran
fde57eb9d1 Convert aidl.export_aidl_headers in cc library to Bazel
Export/not aidl headers aren't fully properly functional until b/239311679 is fixed.

Test: go test
Bug: 243023967
Change-Id: I33ec9a591b4bc53aa0aa95d099159cb0a79c39cb
2022-09-09 16:02:51 -04:00
Treehugger Robot
5aa5dc4121 Merge "Fix gen_notice init to support arch and dist." 2022-09-09 19:34:06 +00:00
Chih-hung Hsieh
2c3bb705e0 Merge "Prepare to build clang-r468909" 2022-09-09 19:15:49 +00:00
Treehugger Robot
383e29bc12 Merge "Work around stack frame size for memtag-stack" 2022-09-09 17:46:45 +00:00
Steven Moreland
7ae3a3c170 Merge "FailIfNoMatchingErrors specify using regex" 2022-09-09 17:27:23 +00:00
Cole Faust
d02ca056a3 Don't close file descriptors when starting python program
Python programs run via a wrapper script. That wrapper script
can be started with open file descriptors, for example by using
the <(echo foo) syntax in bash. The shouldn't be closed when
starting the real script.

Bug: 203436762
Test: Presubmits
Change-Id: Ib20450f713b15c8a5527d1e433bfd9635cead85f
2022-09-09 10:27:15 -07:00
Vinh Tran
095a1af1a1 Merge "Convert av-types-aidl aidl_interface to Bazel" 2022-09-09 14:45:22 +00:00
Jingwen Chen
2247acae0c Allowlist more modules under the adb package.
These are all buildable.

Bug: 239041723
Bug: 243025934

Test: presubmits
Change-Id: Id3de8d9b7f2f83fca78f26708dabb4b93372fc16
2022-09-09 12:17:53 +00:00
Jingwen Chen
d4a0b1f63c Allowlist adbd_test.
Builds and passes on cuttlefish.

Test: $ lunch aosp_x86_64 && b build //packages/modules/adb:adbd_test --config=android && adb push bazel-bin/packages/modules/adb/adbd_test /data/tmp/adbd_test && adb shell /data/tmp/adbd_test

Bug: 239041723
Bug: 243025934
Change-Id: Ic73378c770b654fad5fcf99a672977eda8fe2e06
2022-09-09 10:32:43 +00:00
Jingwen Chen
80888257ad Merge "Update tests to use --config=android." 2022-09-09 06:36:09 +00:00
Florian Mayer
1e4f899c1d Work around stack frame size for memtag-stack
The root cause for the warning is fixed in upstream LLVM
(https://reviews.llvm.org/D127917) , working around until
that is submitted.

Test: make libc with memtag-stack
Bug: 174878242
Change-Id: Iae8c85f39bdceb9752b7f2758c5543c1b3f90277
2022-09-08 23:59:23 +00:00
Treehugger Robot
8bdc04b9e0 Merge "Pass -flto to asflags as well" 2022-09-08 20:22:02 +00:00
Usta (Tsering) Shrestha
a4f73d937e Merge "Use list comprehensions in Starlark" 2022-09-08 20:14:49 +00:00
Sorin Basca
3cc6201d71 Merge changes I6fed538a,I38df207c
* changes:
  Pin javadoc to JDK 11
  Open java.lang for dokka
2022-09-08 19:17:34 +00:00
Bob Badour
e38387314a Fix gen_notice init to support arch and dist.
Incorrect init function was called so Stem property was not handled
correctly and the dist properties were treated as unknown.

Test: m droid dist
Change-Id: I5eb8771afb4fda332df08cf1560df5c17d1316cc
2022-09-08 12:07:10 -07:00
Yu Liu
dd6321213e Merge "Support proto.include_dirs" 2022-09-08 18:34:34 +00:00
Christopher Parsons
300e2493e7 Merge "Add adbd to mixed build prod allowlist" 2022-09-08 18:13:51 +00:00
Yi Kong
5e0f405abf Pass -flto to asflags as well
Although it has no effect, CFI mandates -flto in asflags.

Test: presubmit
Bug: 243476017
Change-Id: I33246488140c642894f3fbab65bc37bdd5de3024
2022-09-09 01:58:18 +08:00
Usta Shrestha
79fccefc59 Use list comprehensions in Starlark
also using a generic json_encode as an approximation for `json.encode`

Test: USE_BAZEL_ANALYSIS=1 m libc
Bug: b/242587802
Change-Id: Ib83aeda3f99cc3966548b0cd47e72669422ed72d
2022-09-08 17:12:42 +00:00
Chih-Hung Hsieh
ec450d9113 Prepare to build clang-r468909
* Allow/show clang deprecated* and array-parameter warnings
  to pass build.py with r468909.

Test: presubmit
Bug: 241941550
Bug: 241601211
Change-Id: I46bc1138861371ece24e88fad2d64fdf38ca605d
2022-09-08 10:11:57 -07:00
Sorin Basca
198c51c868 Pin javadoc to JDK 11
Bug: 240421555
Test: m sdk
Change-Id: I6fed538a3a0d05a3115dd930b860aa7769aa6d16
2022-09-08 17:15:18 +01:00
Jingwen Chen
60d8840f65 Update tests to use --config=android.
Bug: 244766775
Test: presubmits
Change-Id: Iaaabd275356c24b3e3713ea1047c134271c4561e
2022-09-08 15:54:32 +00:00
Sorin Basca
1d68e48084 Open java.lang for dokka
Bug: 240421555
Test: m sdk
Change-Id: I38df207ca2c891df24fe32f711b2767cb17195ec
2022-09-08 16:48:01 +01:00
Chris Parsons
543c8c4319 Add adbd to mixed build prod allowlist
Bug: 231322898
Test: m --bazel-mode droid
Change-Id: I7a91f4f04d5e1f6432c63e4a78f81d5b30ed3cc5
2022-09-08 11:40:24 -04:00
Sam Delmerico
263efde0a8 ignore versions_with_info property in queryview
Struct properties are not fully supported by queryview, so disable this
property for now.

Bug: 245727956
Test: m queryview && tools/bazel run --config=bp2build --config=ci --//build/bazel/rules/apex:apexer_verbose --config=linux_x86_64 //build/bazel/scripts/bp2build-progress:bp2build-progress -- graph -m com.android.neuralnetworks --use-queryview
Change-Id: I74da94da82a037234fb2a8fe17780ed0eb309a7b
2022-09-08 10:51:50 -04:00
Mårten Kongstad
9be110d151 Merge "Pass --sdk-extensions-{root,info} to metalava" 2022-09-08 06:08:43 +00:00
Zimuzo Ezeozue
fbb35346eb Merge "Enable aidl#generate_traces by default for Cpp" 2022-09-08 01:13:29 +00:00
Yu Liu
2d13614b89 Support proto.include_dirs
For each package in the include_dirs property a proto_library target
should be added to the BUILD file in that package and a mapping
should be added to the bp2build code, by this way a proper dependency
relationship can be established and used by bazel.

Bug: 239944064
Test: Added unit tests and manually verified include_dirs can be
properly converted to bazel and used by bazel to build the targets.

Change-Id: I50d8ee21fabcfec0a44487f6e5f3d8a3845e79c3
2022-09-07 16:48:17 -07:00
Usta (Tsering) Shrestha
9ba17e8702 Merge "Drop bootstrap.ninja.d" 2022-09-07 22:47:41 +00:00
Christopher Parsons
1f039780e0 Merge "Remove USE_BAZEL_ANALYSIS" 2022-09-07 21:54:47 +00:00
Chris Parsons
1bb58da17c Remove USE_BAZEL_ANALYSIS
Use --bazel-mode-dev instead.

Test: Treehugger
Bug: 244309479
Change-Id: I570d02651eea92375cd96efbeb8d986a9495e1ed
2022-09-07 14:58:03 -04:00
Romain Jobredeaux
3d516cdb07 Keep allowlist alphabetized
Change-Id: I6ba977e4a705a3ba516fd23dcf5ceaf354d7e892
2022-09-07 14:28:31 +00:00
Mårten Kongstad
802ae0fdd3 Pass --sdk-extensions-{root,info} to metalava
Teach soong to pass metalava the two new command line arguments
--sdk-extensions-root <dir> and --sdk-extensions-info <file> when
generating the API levels file (--generate-api-levels api-versions.xml).

The directory hierarcy in a droiddoc_exported_dir module has special
meaning, e.g. extensions/1/public/*-stubs.jar are the mainline module
stubs containing the public API for SdkExt version 1. Update the logic
where the directories are scanned for android.jar files to locate the
SDK extension jars (extensions/<int>/public/*-stubs.jar).

Also introduce a new field on droidstubs properties
(Extensions_info_file) to set the value of --sdk-extensions-info.

Note: if Extensions_info_file is not set, neither
--sdk-extensions-root or --sdk-extensions-info will be passed to
metalava.

Bug: 228828986
Test: go test -run TestDroidstubsWithSdkExtensions ./java
Test: m sdk dist && grep -e from= -e module= out/dist/data/api-versions.xml # needs APIs to be listed in the info file
Change-Id: I682e34d328fc93d3eded8565ffee40961307901a
2022-09-07 16:13:49 +02:00
Chih-hung Hsieh
cedd4117a8 Merge "No clang-tidy by default for external and vendor" 2022-09-07 01:27:38 +00:00
Kiyoung Kim
9bdd218281 Merge "Export API imported library list to Makefile" 2022-09-07 00:48:15 +00:00
Vinh Tran
b01eb60c09 Convert av-types-aidl aidl_interface to Bazel
Change-Id: I1dfb0a58a8a9f9f4a1baeba73ccbb17d30ebd947
Test: b build //frameworks/av:av-types-aidl-cpp
Bug: 235113507
2022-09-06 23:04:23 +00:00
Chih-Hung Hsieh
1a46753cbf No clang-tidy by default for external and vendor
* Most tidy-external-* and tidy-vendor-* rules
  are no longer generated. But external/bcc,
  external/android-clat, and some vendor/...
  projects still have tidy- rules because they
  have explicitly set tidy:true in .bp files.
* Some hardware/* directories are third-party
  projects and also disabled by default.

Bug: 244631413
Test: presubmit; make tidy-soong_subset
Change-Id: I17f625e6270de81a111d9cd382fbc39f34edf924
2022-09-06 13:59:33 -07:00
Trevor Radcliffe
a355be226f Merge "cc bp2build for sysprop_library modules" 2022-09-06 19:27:22 +00:00
Yi Kong
a4631f41cd Merge "Do not enable global ThinLTO for tests" 2022-09-06 19:03:54 +00:00