Commit graph

58795 commits

Author SHA1 Message Date
Cole Faust
3bd8f0a6e6 Merge "Revert ^2 "Prevent unspecified values in soong_config_string_variable""" 2022-10-27 16:41:29 +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
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
Liz Kammer
748209cb6b Disable all filegroups in mixed builds
Rather than individually denylisting filegroups until we prioritize a
solution for mixed builds that will correctly integrate into uses such
as proto, aidl, gensrcs, etc.

Test: mixed_droid
Change-Id: Iddbd391af7dd7cabc892b2b26dbc68e3aa506471
2022-10-24 11:11:58 -04:00
Liz Kammer
f2a80c6396 Add non-zero exit + error message to soong metrics
Improves some error messages that would have given little/no information

Bug: 254650145
Test: relevant unit tests
Test: Induce errors and check metrics proto
Change-Id: Ife6116af74af6e62c2f8ae8774e53c28178fb8d0
2022-10-24 10:51:56 -04:00
Joe Onorato
ba29f380d3 Move bazel from being a shell function to being a script at build/bazel/bin/bazel
Bug: 254713799
Test: b build //packages/modules/adb/apex:com.android.adbd
Change-Id: I6a0a89438a46d8252c3e0c24319038b0cf2dbd59
2022-10-24 06:38:11 -07:00
Sasha Smundak
706d35fe7c Add --add-exports= options to the java extractor invocation.
Long live Java modules system.

Fixes: 254752344
Test: run build_kzip.bash
Change-Id: I9c807afd22d7b2abc2af1f6ac7a0c1e4c8a8b3e1
2022-10-23 15:23:55 -07:00
Cole Faust
b2ea6c193e Merge "Remove flags that enable the new python path behavior" 2022-10-23 19:19:00 +00:00
Spandan Das
c6c10fa34f Do not register missing deps
This is a fix to aosp/2260763 and skips the existence check corectly.
Previously, it would not throw an exception during Soong analysis, but
would add the path to a `MissingDeps` object. The ninja graph generated
using this would throw an exception during ninja execution.

We should not do this check for `cc_api_library`. The prebuilt
library.so is missing in the build graph of the inner tree (expected),
but it will be present when the orchestrator creates the combined
multi-tree ninja graph.

Test: rm -rf out && multitree_build vendor/vendorimage
(I did not clean out/ in aosp/2260763, and therefore did not catch this
earlier)
Test: go test ./cc

Change-Id: I68d245acae3bfb777bfc8a72fb7cd4909cb0a289
2022-10-22 02:26:30 +00:00
Cole Faust
caf766b74f Remove flags that enable the new python path behavior
The new behavior has been enabled by default, and these
flags aren't necessary anymore.

Fixes: 245583294
Test: m py_dont_import_folder_of_entrypoint_test && /ssd/aosp-master/out/host/linux-x86/testcases/py_dont_import_folder_of_entrypoint_test/x86_64/py_dont_import_folder_of_entrypoint_test
Change-Id: I5b6f98da51791bc5d28662ef799a10c1bb6a35a0
2022-10-21 16:07:56 -07:00
Vinh Tran
a38504fd11 Merge "Disable converted filegroups in mixed build" 2022-10-21 23:00:34 +00:00
Rex Hoffman
8165dd6941 Merge "Enable new_robolectric" 2022-10-21 22:17:27 +00:00
Vinh Tran
ce77a337ee Disable converted filegroups in mixed build
Bug: 254796426
Test: m libplatformprotos --bazel-mode-dev
Change-Id: I03f4f4847f8dafc3291c1cceed2dd62be4c91746
2022-10-21 16:48:37 -04:00
Usta Shrestha
49d04e89d8 cosmetics
Test: m --bazel-mode nothing
Bug: b/239044236
Change-Id: Iaffc315c696f2fa19a2525009010d5964cf5a7d1
2022-10-21 20:09:23 +00:00
Romain Jobredeaux
7c4ef0718c Merge "Add Soong metric variable to indicate whether bazel mixed build was force-disabled." 2022-10-21 18:22:02 +00:00
Rex Hoffman
54641d2aec Enable new_robolectric
Allow new robolectric to break soong's exepected machine type restrictions

Test: mma in /external/robolectric
Bug: 244627502

Change-Id: If58a36b2d84804d586d9c8a773e2e739867fa987
2022-10-21 17:53:40 +00:00
Mark Dacek
99db041a14 Merge "Add bazel staging mode to soong build." 2022-10-21 17:38:43 +00:00
Cole Faust
c52527364f Merge "Fix bazel builds with unspecified arch" 2022-10-21 17:34:31 +00:00
Romain Jobredeaux
ea098efcd8 Add Soong metric variable to indicate whether bazel mixed build was force-disabled.
Test: unit tests
Change-Id: I17b96edd28ace5a29a6889d6f003b6a38dbeb68e
Bug: 254649740
2022-10-21 15:50:01 +00:00
Jingwen Chen
3b13b61d9d Don't rely on TOP+OUT_DIR as the location for OUT_DIR.
OUT_DIR may not be in TOP (where the source tree is).

Test: presubmits
Test: set OUT_DIR=$HOME/out1; m --bazel-mode nothing

Fixes: 254022328
Change-Id: I8cf9fe2da3cdc0ba5489dfbe41d9d32f06ace83d
2022-10-21 09:39:12 +00:00
Krzysztof Kosiński
e0774afdd0 Merge "Globally enable -Wdefaulted-function-deleted." 2022-10-21 04:29:12 +00:00
Treehugger Robot
26e62c8d74 Merge "Set -fno-emulated-tls for riscv64" 2022-10-21 03:31:38 +00:00
Jiyong Park
61807339b8 Merge "Install appSet using InstallFileWithExtraFilesZip" 2022-10-21 00:17:52 +00:00
Cole Faust
f5eae990bc Fix bazel builds with unspecified arch
//build/bazel/platforms:android_target is an alias to
android_{arch}, so on bulids like "ndk" that don't
specify an arch, it fails.

It's also questionable if we should be setting the
platform to android in a mixed build in the first
place. What if we were mixed-building a host tool?

This reproduces when running
`OUT_DIR=out ./build/soong/scripts/build-ndk-prebuilts.sh`
with aosp/2263623. That script specifies --soong-only,
which is important because even without bazel, `m nothing`
on ndk-userdebug will fail with errors in makefile code.

Bug: 254701254
Test: Described above
Change-Id: I34cae0287830a19c4865fbd398f3c4e1ee1d2d66
2022-10-20 16:49:30 -07:00
Colin Cross
e127b4d060 Merge "Disable LTO and CFI for riscv64" 2022-10-20 23:47:54 +00:00