Commit graph

58817 commits

Author SHA1 Message Date
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
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
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
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
Yu Liu
2ff53da9f8 Merge "Support apex_test." 2022-10-26 16:37:59 +00:00
Orion Hodson
ffd5b97267 Merge "Allow all of libcore to have NewApi warnings" 2022-10-26 15:08:25 +00:00
Orion Hodson
b2d3c8cac6 Allow all of libcore to have NewApi warnings
Required due to minor refactor of libcore projects.
Bug: 208656169
Bug: 255273691
Test: TH
Change-Id: Ifd2ef6d3553ade5a059880398075c70635d428dd
2022-10-26 15:07:11 +00:00
Treehugger Robot
e052da08bc Merge "Don't try to load libSegFault.so if it doesn't exist" 2022-10-25 23:50:42 +00:00
Cole Faust
0356007954 Don't try to load libSegFault.so if it doesn't exist
glinux seems to have changed, and libsegfault.so isn't
available (or at least at that location) anymore.

Test: Presubmits
Change-Id: Ic94621a2980200f24bf501e543fa6e72b0c71951
2022-10-25 14:38:31 -07:00
usta
8e07a47ed2 .gitignore IntelliJ project files
Test: N/A
Bug: N/A
Change-Id: I4f9d69a24c6ceb9d5b8babcb5731af349f0f395a
2022-10-25 17:02:02 -04:00
Joe Onorato
934977cbbe Merge "Move bazel from being a shell function to being a script at build/bazel/bin/bazel" 2022-10-25 17:56:58 +00:00
Usta Shrestha
783ec5c72c Remove a self-dependency of bp2build
bp2build (i.e. bootstrap.ninja#bp2build_workspace_marker) generate $OUT/soong/bp2build/**/BUILD.bazel files
Having them as a dependency would thus make bp2build_workspace_marker stale upon incremental builds (because we don't re-touch the marker file if it already exists)

See Also: https://android-review.googlesource.com/c/platform/build/soong/+/2263423

Bug: b/253450880
Test: NINJA_ARGS='-d explain' m --bazel-mode adbd
      repeat and see if bp2build is rerun
prior to this CL, one would see the input /usr/local/google/home/usta/aosp/out/soong/bp2build/build/make/tools/BUILD.bazel trigger bp2build over and over again

Change-Id: I904cd333a5d6ef506fc4019eda7623ef96a1daa3
2022-10-25 13:46:20 +00:00
Usta (Tsering) Shrestha
39f17ad8b8 Merge "don't touch bp2build_workspace_marker file if it exists" 2022-10-25 13:40:59 +00:00
Usta (Tsering) Shrestha
5689aa36f6 don't touch bp2build_workspace_marker file if it exists
- the generating rule has `restat=true`, so its output need not have a newer timestamp to prevent it from rerunning on subsequent ninja invocations
- its dependents (so far only bootstrap.ninja's "build build.ninja") already have proper dependencies in the depfile, namely
  1. Android.bp.list,
  2. entries in Android.bp.list,
  3. bazel.list and
  4. entries in bazel.list

This change prevents symlink related changes from spuriously retriggering build.ninja

Change-Id: I93f1fea7054dfbfc7c13ece34d2d1f07a81bbe07
Test: manually verifying bazel analysis is triggered only under the right set of CUJs using build/bazel/ci/incremental_build.py
Bug: b/239044236
2022-10-25 13:40:34 +00:00
Alessandro Astone
2b17a23da8 Tweak Soong install rules logging
The make counterparts print a colon, so match that

Change-Id: I9482a0e66b03ad41a66df09d29e76b465ece35c5
2022-10-25 11:46:01 +02:00
Lukacs T. Berki
a3b9688859 Do not add .bp files to the .d file of bp2build.
This is okay because Blueprint already adds the module files to the
.d file of its output, so until now, they were duplicated.

Test: presubmits
Change-Id: I1bb75c5124aadd1703f3d150948dd7540ba772be
2022-10-25 09:26:06 +00:00
Kiyoung Kim
11d9108cc7 Replace with stubs only for Android non-native-bridge targets
Host tools and native-bridge targets should be built on top of original
module rather than stubs. This change updates DepsMutator not to replace
to API surface stubs if target is not Android or target is
native-bridge.

Bug: N/A
Test: CF vendor build succeeded
Change-Id: I97eb98d9e63dcf15632468aa32211a14d48986a0
2022-10-25 04:04:20 +00:00
Treehugger Robot
1227abee34 Merge changes from topic "api_library_missing_deps"
* changes:
  Do not register missing deps
  Skip existence check for stub library files
2022-10-25 03:12:07 +00:00
Usta (Tsering) Shrestha
a0e575c7dc Merge "cosmetics" 2022-10-25 01:37:23 +00:00
Treehugger Robot
2e7170773e Merge "Disable all filegroups in mixed builds" 2022-10-25 01:19:29 +00:00
Treehugger Robot
63108dc2be Merge "write soong.environment.used.* file only if changed" 2022-10-24 21:36:06 +00:00
Treehugger Robot
2238c73723 Merge "Export all constants for linux_bionic" 2022-10-24 20:06:48 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
c4d11bc470 Export all constants for linux_bionic
They need to be referenced in adding a `linux_bionic` Bazel cc_toolchain

Test: CI
Bug: 205771732
Change-Id: I5469eac5559cdf76e02fdeccaf496e5ffcc1b08e
2022-10-24 18:08:56 +00:00
Usta Shrestha
2ba28a34bd write soong.environment.used.* file only if changed
Bug: b/255309129
Test: `lunch aosp_x86-userdebug` and `export NINJA_ARGS="-d explain"`
      Then do the following:
        1) rm -rf out && m bp2build
        2) touch bionic/libc && m bp2build
        3) ALLOW_MISSING_DEPENDENCIES=true m bp2build
      After each step above observe the following two
        a)`stat out/soong/soong.environment.used.bp2build | grep Modify`
        b)`stat out/soong/bp2build_workspace_marker | grep Modify`
      Verified:
       step 2 changes only (b) - prior to this CL, it'd change (a) as well
       step 3 still changes both (as expected)
Change-Id: I98a94878a14e19043f448b0904fc67d5d1dc9733
2022-10-24 17:55:06 +00:00
Yu Liu
4c212ce058 Support apex_test.
Bug: 249744489
Test: Manual and unit test.
Change-Id: I866debf7ffee54a0f4649b5e5425a8e3cc3042a1
2022-10-24 10:35:12 -07:00