Commit graph

58383 commits

Author SHA1 Message Date
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
Treehugger Robot
bf5fa97bb6 Merge "Remove gen-kotlin-build-file.py from Bp2buildModuleDoNotConvertList" 2022-09-06 18:54:30 +00:00
Yi Kong
56fc1b6902 Do not enable global ThinLTO for tests
Tests are not shipped, no need to spend extra CPU cycles optimising them
during build.

Test: GLOBAL_THINLTO=true m
Bug: 169004486
Change-Id: I66ede9c01d43b574a7fe9f74f0bc6ba97f51be06
2022-09-06 16:24:00 +08:00
Cole Faust
0228d27943 Merge "Support arch features in bp2build" 2022-09-06 02:13:59 +00:00
Cole Faust
c843b99b71 Support arch features in bp2build
Bug: 189972518
Test: New soong test
Change-Id: I05d77c8f63ffe6697d8e0300226864658055e116
2022-09-02 15:20:54 -07:00
Sam Delmerico
3dca115dda Merge "jacoco libs dependency for instrumented libraries" 2022-09-02 18:50:29 +00:00
Alix Espino
8c7efde76c Merge "Handle filename variations for prebuilt_etc in bp2build" 2022-09-02 18:41:11 +00:00
Trevor Radcliffe
ad3d123fb6 cc bp2build for sysprop_library modules
This CL implements bp2build functionality for the cc outputs of
sysprop_library modules. cc_* modules depending on sysprop sources
will be handled in a later CL.

Bug: 244439349
Test: b build //system/libsysprop/srcs/...
Test: Inspect BUILD.bazel
Test: Unit tests
Change-Id: I6fa20661b984223347480c9afe0885b5db5a2807
2022-09-02 18:27:39 +00:00
Cole Faust
e89f91df44 Remove gen-kotlin-build-file.py from Bp2buildModuleDoNotConvertList
Its issue was fixed in aosp/2202605

Bug: 198619163
Test: Presubmits
Change-Id: Ic3878ea1280f8f1ebab1b4c2423e07d795886c94
2022-09-02 10:26:50 -07:00
Treehugger Robot
d75966e7db Merge "Remove system shared libs from non-bionic dep list" 2022-09-02 16:52:43 +00:00
Colin Cross
6d89152f33 Merge "Make toolchain more compose-y" 2022-09-02 15:33:17 +00:00
Liz Kammer
43345e23da Remove system shared libs from non-bionic dep list
bionic system shared libraries only build for bionic platforms, so it is
safe to remove them from other platforms, preventing issues where
duplicate libraries are incorrectly identified in Bazel.

Test: go test soong tests
Change-Id: Idac27c49a464831f8aca02d561f41f98fc763337
2022-09-02 10:46:38 -04:00
Trevor Radcliffe
d6fdd16617 Merge "Export RunBp2BuildTestCaseSimple() in testing.go" 2022-09-02 13:31:04 +00:00
Treehugger Robot
f20433b15f Merge "Handle product config specific header_libs prop in cc bp2build" 2022-09-02 13:02:04 +00:00
Zim
3c3b4165cb Enable aidl#generate_traces by default for Cpp
Test: Manual
Bug: 161393989
Change-Id: I0bbd42217c85e42b2a739b46bb2177186cfd40ed
2022-09-02 12:45:05 +01:00
Zim
8774ae1ba1 Enable aidl#generate_traces by default for some Java SDK kinds
This will enable AIDL tags in perfetto traces for the following SDKs:
1. SdkSystemServer
2. SdkCore
3. SdkCorePlatform

SdkModule requires exposing some Trace methods as
@SystemApi(MODULE_LIBRARIES). This will come as a follow up

Test: Manual
Bug: 161393989
Change-Id: I01d520afa8e26eabb97318192151b707b002c28b
2022-09-02 12:43:39 +01:00
Treehugger Robot
c40694830b Merge "Fix module-file name collisions" 2022-09-02 00:24:00 +00:00
Cole Faust
bcc3d05aba Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Bug: 198619163
Test: Presubmits
Change-Id: Ie9731b627945d2ff221d3a5d08a32a5a172f9dcd
2022-09-01 15:20:00 -07:00
Zi Wang
0a8a129ee8 Handle product config specific header_libs prop in cc bp2build
Product variable header_libs is able to be converted.
Since static_libs and header_libs both use implementationDeps,
also added logic to make sure they both contribute to bazel
target.

Bug: 228314770
Test: m bp2build
Test: TestCcLibraryProductVariablesHeaderLibs in cc_library_conversion_test
Change-Id: I370fc75b666b3908b6ac5ed42bca5560f957fc42
2022-09-01 14:32:51 -07:00
Colin Cross
fc3b064c9a Make toolchain more compose-y
Remove many of the overridden methods from toolchainBase in favor
of having smaller composable types.  toolchainNoCrt, toolchain32Bit
and toolchain64Bit now only provide a few methods and can be mixed
in to any toolchain type.  toolchainLinux, toolchainBionic,
toolchainWindows and toolchainDarwin now embed toolchainBase to provide
the default flags methods for when they don't override them.

This avoids the need for disambiguation methods required when a
type embeds two types that implement the same method.

Test: cc_test.go
Change-Id: I641da2a47aba597c517f693efedb65cf41273c82
2022-09-01 14:21:36 -07:00
Yabin Cui
a73e672503 Merge "symbol_inject: add step to codesign Mach-O binaries." 2022-09-01 21:01:04 +00:00
Treehugger Robot
3636a06fe0 Merge "Use CommonAttributes.Data for cc_test.data." 2022-09-01 20:55:26 +00:00
Florian Mayer
41e31d8092 Merge "Revert "Revert "[soong] Add memtag-stack sanitizer, switch to li..."" 2022-09-01 19:29:33 +00:00
Yabin Cui
7f5f22b226 symbol_inject: add step to codesign Mach-O binaries.
The adhoc codesign of Macho-O binaries is broken after symbol
injection. MacOS refuses to run the binaries unless we sign
them again.

Bug: 241493489
Test: build and run simpleperf_ndk64 on MacOS
Change-Id: I25ef5c6413bd97e1bfa0a4ec5d04eaefb6fea54c
2022-09-01 11:57:13 -07:00