Commit graph

58843 commits

Author SHA1 Message Date
Sam Delmerico
af9dbb30f6 Merge "move logtags rule from //build/make to //build/bazel" 2022-11-01 13:50:10 +00:00
Jingwen Chen
e647db8186 Fix --bazel-mode-staging flag.
It was assigning --bazel-mode-staging to cmdlineArgs.BazelMode, which
looks wrong.

Test: presubmits
Change-Id: I24b087977fc6861eef3a1c30e58d9bf42a344c52
2022-11-01 11:28:29 +00:00
Treehugger Robot
0b2788e833 Merge "Skip the noop Soong dep edge for api_domain and contributions" 2022-11-01 03:07:14 +00:00
Usta (Tsering) Shrestha
459eb30827 Merge "Fix collection of stale soong build metrics" 2022-11-01 02:54:19 +00:00
Treehugger Robot
0fc368cff7 Merge "Generate a default wrapper for device java_binary" 2022-10-31 20:13:10 +00:00
Usta (Tsering) Shrestha
3bb3763afd Merge "include symlink metrics in bp2build_metrics.pb" 2022-10-31 20:00:36 +00:00
Sam Delmerico
14f9f10a4e Merge "add comment to sync Bazel clang-tidy rules" 2022-10-31 18:55:24 +00:00
Sam Delmerico
13fbf4ac83 add comment to sync Bazel clang-tidy rules
The Bazel rules now have a separate implementation of the logic to
add flags to clang-tidy. This should be kept up to date with the Soong
implementation.

Bug: 195029134
Change-Id: I61efda081bf1627d352887b13a70d1d53944d368
2022-10-31 14:43:27 -04:00
usta
7f56eaa748 Fix collection of stale soong build metrics
Bug: b/256037411
Test: run mixed build twice and ensure soong_build_metric.pb file is absent on second run.
Change-Id: Ia11d850e1ad318e6383d8b392f20420259bc2f4d
2022-10-31 14:10:59 -04:00
Sam Delmerico
8604df6fb1 Merge "export clang-tidy variables to soong_injection" 2022-10-31 17:23:19 +00:00
Spandan Das
e1ef88c197 Merge "Assemble API surface headers before compiling rdeps" 2022-10-31 16:53:17 +00:00
usta
4f5d2c1e97 include symlink metrics in bp2build_metrics.pb
Bug: b/256212479
Test: Prior to thi CL bp2build.symlink_forest event was missing in bp2build_metrics.pb after a clean mixed build
Change-Id: I53bfc4114a383c0d1f9c4c7945e7d4c69bc50b0c
2022-10-31 11:38:10 -04:00
Sam Delmerico
2b8462997a Merge "add clang_tidy properties to bp2build" 2022-10-31 14:49:21 +00:00
Alix Espino
35ac313c32 Merge "Bp2build Java libs for java_binary -> java_import edge" 2022-10-31 14:04:54 +00:00
Treehugger Robot
6ae9b508bf Merge "Don't add unused properties to android_test_import" 2022-10-31 06:57:45 +00:00
Treehugger Robot
4e9ffee4bf Merge "Move restricted_allows_dynamic_linking into LGPL" 2022-10-29 06:57:52 +00:00
Wei Li
aff9a46ca5 Merge "Support new attributes added in ApexInfo in mixed build." 2022-10-29 01:16:39 +00:00
Wei Li
32dcdf9038 Support new attributes added in ApexInfo in mixed build.
Bug: 243748589
Test: CI
Change-Id: I6c9869464fe91ebf62811d92cf4403f2c7c9e8a9
2022-10-28 14:06:57 -07:00
Alix
b4e09a0ada Bp2build Java libs for java_binary -> java_import edge
Since Bazel's java_import requires a jars attribute to be specified,
the generated neverlink-duplicated module is of type java_library

Change-Id: I14a866dfc583507a9462add50d95060cbfe540c5
Bug: 244210934
Test: m bp2build, go test ./bp2build, manual inspection of generated Build and jar files
2022-10-28 20:26:38 +00:00
Bob Badour
83a0b8f480 Move restricted_allows_dynamic_linking into LGPL
Putting the specific condition into the license_kind simplifies the
logic and prepares for a future where licenseclassifier provides
conditions without license_kinds

Bug: 245562496

Test: m droid
Change-Id: I42c26fb3096b40767a68474ed712dbe55ed3f035
2022-10-28 12:07:20 -07:00
Yabin Cui
9b019134c2 Merge "Prepare to build clang-r475365" 2022-10-28 17:53:35 +00:00
Christopher Parsons
057ad009c7 Merge "Remove adbd from bazel prod allowlist" 2022-10-28 16:19:35 +00:00
Christopher Parsons
aa90b9410d Merge "Revert "Multithread symlink forest removal."" 2022-10-28 15:45:14 +00:00
Christopher Parsons
ed2873aea0 Revert "Multithread symlink forest removal."
This reverts commit 6b236f1607.

Reason for revert: Breaks ab/aosp-master-bazel incremental builds. Details on b/254338319

Change-Id: I37eeeda50cff0475d91e7926fdf74216975a0037
2022-10-28 15:43:48 +00:00
Mark Dacek
df02a8c258 Merge "Add bazelMode arguments to multiproduct_kati." 2022-10-28 15:22:02 +00:00
Lukács T. Berki
935b46630f Merge "Multithread symlink forest removal." 2022-10-28 14:55:41 +00:00
Jason Wu
1cb6739c01 Merge "Rollforward "Use proto output instead of jsonproto output for aquery""" 2022-10-28 14:47:52 +00:00
Lukacs T. Berki
6b236f1607 Multithread symlink forest removal.
This makes symlink forest creation ca. 2x faster again, taking 2-3
seconds instead of 5.

Who would have thought that os.RemoveAll() is slow.

Test: Presubmits.
Change-Id: I91e41319c972dbf1113cf723e383c785433c18b9
2022-10-28 07:15:55 +00:00
Lukács T. Berki
4bb30b59a9 Merge changes from topic "separate-symlink-forest-invocation"
* changes:
  Build the symlink tree on multiple threads.
  Create Bazel symlink forest in a separate process.
2022-10-28 07:05:00 +00:00
Hsin-Yi Chen
6f536ae918 Merge "Enable ABI diff between the source code and the previous version" 2022-10-28 03:10:36 +00:00
Treehugger Robot
2b1a1bff0f Merge "The NDK _does_ assume neon now." 2022-10-28 01:50:58 +00:00
Elliott Hughes
c55b58692d The NDK _does_ assume neon now.
This lets us simplify more of our build configuration for stuff like
libm and libz.

Test: treehugger
Change-Id: I823c7df8117f068aeeb7067e8e197863b0fb517f
2022-10-27 23:46:22 +00:00
Yabin Cui
0ebe7c8eb3 Prepare to build clang-r475365
Allow single-bit-bitfield-constant-conversion warnings to pass
with r475365.

Bug: 253033919
Test: run test_compiler.py
Change-Id: Icc1f1c6c013418f1e5bb839ef70ebe8498b9cedc
2022-10-27 15:55:03 -07:00
MarkDacek
c9d5bd8816 Add bazelMode arguments to multiproduct_kati.
These are needed to add staging-mode to some throttled builds. See go/roboleaf-launch-tests for details.

Test: m nothing
Test: build/soong/build_test.bash --bazel-mode-staging

Change-Id: I456ef80fb9c50579a28fba3dbd184d4e4653dde7
2022-10-27 21:24:13 +00:00
Victor Liu
2ea00270a3 Merge "Revert "Revert ^2 "Prevent unspecified values in soong_config_st..."" 2022-10-27 19:11:31 +00:00
Brad Hinegardner
b7b2e12475 Revert "Revert ^2 "Prevent unspecified values in soong_config_st..."
Revert submission 2262062-colefaust_soong_config_string_variable_2nd_try

Reason for revert: breaks builds, b/255996492 among others
Reverted Changes:
I3e2f59e5f:Fix typo
Id3bcd9a46:Revert ^2 "Prevent unspecified values in soong_con...

Change-Id: Ifa8ebb3993bf2c716c3ec3c9fdbe72ba019e77ad
2022-10-27 19:01:10 +00:00
Jason Wu
118fd2b443 Rollforward "Use proto output instead of jsonproto output for aquery""
Test: use m --bazel-mode-dev and mixed_droid.sh
Bug: 233798334

This reverts commit d27e28c2a7.

Change-Id: Ifd37ac449979330529dd25c92a5eca2f5a80827e
2022-10-27 18:41:50 +00:00
Zi Wang
ca65b40fa0 Generate a default wrapper for device java_binary
Any device java_binary that doesn't have a specific wrapper must
have a main_class property, which is used to generate its default
wrapper. Otherwise its build should fail.

Bug: 250851599
Test: TestDeviceBinaryWrapperGeneration in java_test.go
Change-Id: Ice4c580bcfc1b92f95e217b39e984c55d25a3a02
2022-10-27 11:19:53 -07:00
Cole Faust
3bd8f0a6e6 Merge "Revert ^2 "Prevent unspecified values in soong_config_string_variable""" 2022-10-27 16:41:29 +00:00
Lukacs T. Berki
647e7abfa2 Build the symlink tree on multiple threads.
This makes it take ~5 seconds on AOSP instead of ~10. Frankly, the
speedup is somewhat disappointing but at least the code is not
complicated.

Test: Presubmits.
Change-Id: Icf94d7ca8bd80c458d014f4cf4cc1be7138deaa6
2022-10-27 10:17:20 +00:00
Hsin-Yi Chen
d2079b646c Enable ABI diff between the source code and the previous version
This commit removes "-advice-only from" the command of cross-version ABI
diff. The ABI changes that are incompatible with the previous version
are propagated as build errors. The developers need to follow the
error message to resolve the ABI difference.

Test: make
Bug: 244520027
Change-Id: Ic6e7757d2b35b619afcc8f50c892d1cfe989c800
2022-10-27 18:03:09 +08:00
Lukacs T. Berki
c541cd27fa Create Bazel symlink forest in a separate process.
This helps with incrementality a lot: the symlink forest must depend on
almost every directory in the source tree so that if a new file is added
or removed from *anywhere*, it is regenerated.

Previously, we couldn't do this without invoking bp2build, which is
quite wasteful because bp2build takes way more time than the symlink
forest creation, even though we do the latter in a very suboptimal way
at the moment.

This means that if a source file is added or removed (which does not
affect globs), we don't pay the cost of bp2build anymore.

Also refactored symlink_forest.go on the side. Too much state was being
passed around in arguments.

This change reimplements aosp/2263423 ; the semantics of not touching an
output file is the exact same as order-only inputs and the latter is a
bit fewer lines of code.

Test: Presubmits.
Change-Id: I565c580df8a01bacf175d56747c3f50743d4a4d4
2022-10-27 08:08:45 +00:00
Jason Wu
ab17626ba6 Merge "Revert "Use proto output instead of jsonproto output for aquery"" 2022-10-27 05:24:40 +00:00
Jason Wu
d27e28c2a7 Revert "Use proto output instead of jsonproto output for aquery"
This reverts commit 6fe8721e12.

Reason for revert: Broke aosp_kernel-build-tools/linux

Change-Id: I502ec4c275cbc56e1024a42fadf68b308750939d
2022-10-27 05:18:40 +00:00
Jason Wu
b1bd4bf716 Merge "Use proto output instead of jsonproto output for aquery" 2022-10-27 03:06:12 +00:00
Treehugger Robot
b5703b83a3 Merge "Tweak Soong install rules logging" 2022-10-26 22:37:59 +00:00
Spandan Das
a3c8a175ca Assemble API surface headers before compiling rdeps
The current combined multi-tree build graph is not accurate. A vendor.c
file currently does not have a dependency on the assembled .h file in
multi-tree out. Previous successful builds of
`multitree_build vendor/vendorimage` were a happy
coincidence (presumably because the actions which copy the .h files from
a speciific inner tree to out/ are at the bottom of the build graph).

Fix this by exporting `cc_api_library.src` to be an order only
dependency of its rdeps (both compile and link). Making an .so file an
order only dependency of _compilation_ is probably confusing, but I
think it will be less confusing than the other alternative I could think
of (creating .timestamp files for each api_surface include dir and
creating phony targets to make them available from top-level to chdir'd
inner tree)

Test: go test ./cc
Test: orchestrator/prebuilts/build-tools/linux-x86/bin/nsjail --config
out/nsjail.cfg --
orchestrator/prebuilts/build-tools/linux-x86/bin/ninja -f
out/multitree.ninja -t path
vendor/out/soong/.intermediates/external/angle/angle_common/android_arm64_armv8-a_cortex-a53_static/obj/external/angle/src/common/android_util.o
out/api_surfaces/vendorapi/current/libc/libc_headers.contribution.androidos_include/features.h

(Path did not exist before this CL)

Change-Id: I74391100f2108993448004019eeba6456af0c12a
2022-10-26 21:10:44 +00:00
Jason Wu
6fe8721e12 Use proto output instead of jsonproto output for aquery
Test: use m --bazel-mode-dev and mixed_droid.sh
Bug: 233798334
Change-Id: Ib945359d3d05e6f51afe70432ec380e4e584175b
2022-10-26 17:07:48 -04:00
Chris Parsons
20602fbe4f Remove adbd from bazel prod allowlist
This is to prepare for an imminent launch of bazel prod mode to all
users.

Note that this means a temporary test regression for bazel-built adbd, as
we have CI builds in place to verify adbd prod mode, and now we will
have no e2e coverage of mixed builds with adbd allowlisted. Still, this
test regression should hopefully be shortlived, as we begin launching
bazel-built build chunks as part of feature rollout in the coming weeks.

Test: Treehugger
Change-Id: I3c34ce91ac3454d1f71340a0fa03951f2e69f203
2022-10-26 16:25:31 -04:00
Romain Jobredeaux
0a7529b02c Log whether user explicitly disabled mixed builds in Soong metrics.
Test: unit tests
Bug: 254649740
Change-Id: I2d4080955e10fe4b50e335c97c79dddbdd22c170
2022-10-26 15:06:33 -04:00