Commit graph

1029 commits

Author SHA1 Message Date
Yu Liu
1b2ddc8093 Write ninja file in parallel.
Bug: 335718784
Test: CI
Change-Id: Ie36d78478a60359b704767689846e76b1c2ba76d
2024-05-20 20:28:44 +00:00
Kousik Kumar
074e4cc9ad Remove warning about LOAS not enabled
RBE is now the default for all Google internal builds, so this warning
is no longer necessary.

Bug: n/a
Change-Id: I2da3e9b84c20f32b3e3f90f49a974512248db2ec
2024-05-03 13:50:10 +00:00
Nelson Li
ad3dae8780 Update Android.mk denylist to block frameworks/
All Android.mk files under `frameworks/` have been converted to
Android.bp. Add it to the block list to avoid using any newly added
Android.mk.

Bug: 322732227
Test: CIs
Change-Id: I1980b2f94704c15d60579b21915e51e0f4a35c1e
2024-04-03 15:17:49 +00:00
Elliott Hughes
34c93d8e15 Merge "We have a prebuilt getopt now." into main 2024-03-22 17:33:47 +00:00
Elliott Hughes
4e0ccf4f59 We have a prebuilt getopt now.
getopt doesn't appear to be used any more, but we've added the prebuilt anyway. Update soong's $PATH allowlist correspondingly.

Change-Id: Id416703697f464f4a3b73771611e087d2ec265d1
2024-03-22 16:08:21 +00:00
Yu Liu
ee37914529 Merge "Store the changed_inputs field in build.trace." into main 2024-03-13 15:54:13 +00:00
Andus Yu
2b8928444d Merge "Make sure RBE socket address is under character limit" into main 2024-03-12 13:45:51 +00:00
Sorin Basca
7f4fa82732 Merge "Revert^2 "Switch to JDK 21"" into main 2024-03-11 18:40:04 +00:00
Sorin Basca
5dfa238f22 Revert^2 "Switch to JDK 21"
This reverts commit b832ae19d8.

Reason for revert: Reland Switch to JDK 21 when related issues are resolved.

Bug: 313924276
Change-Id: Ibb5031d9892d1ddc5bc4d2af9885c3192b8ac8ad
Test: TH
2024-03-11 17:23:06 +00:00
Sam Saccone
bfa20d7e15 Merge "Revert "Switch to JDK 21"" into main 2024-03-11 17:05:56 +00:00
Jihoon Kang
48872f5443 Merge "Fix missing credential error message" into main 2024-03-08 06:34:50 +00:00
Jihoon Kang
70de2c04a7 Fix missing credential error message
LOAS credential enforcement is already taking effect, not in the future.
Update the warning message accordingly.

Test: gcertdestroy && m and inspect error message
Bug: 318506452
Change-Id: I857f44b265c454beaffb9e662bd318aeb29f6cdb
2024-03-08 00:11:20 +00:00
Sorin Basca
b832ae19d8 Revert "Switch to JDK 21"
This reverts commit 5a2e36b755.

Reason for revert: Preparing revert to have it ready in case of breakages relating to using JDK 21.

Change-Id: I153c4933f6891c7fff43e522a4d128acad6b6d47
2024-03-07 21:22:00 +00:00
Treehugger Robot
092c3a56fb Merge "Switch to JDK 21" into main 2024-03-07 19:36:28 +00:00
Yu Liu
a58467ae9a Store the changed_inputs field in build.trace.
Bug: 323021988
Test: Manual tests
Change-Id: If5e060d13f7935ced28d556ab248f2b1e6bdb61d
2024-03-07 18:54:37 +00:00
Andus Yu
c917eb8207 Make sure RBE socket address is under character limit
Check that socket address paths are less than the character limit - 2 since absolute paths are prefixed with //, which is included in the character limit.

b/308986536

Change-Id: I3055b8bb8cdae00aafd66c51fdc8421b9cc5f21f
2024-03-06 21:54:57 +00:00
Sorin Basca
5a2e36b755 Switch to JDK 21
Bug: 313924276
Test: n
Change-Id: Ia9682181a6ce35ed0102d60bf7df1def8f876fd0
2024-02-29 11:44:09 +00:00
Cole Faust
331b27f511 Remove --multitree-build
Multitree has been discontinued.

Test: m nothing --no-skip-soong-tests
Change-Id: Ie4d96a11279bf0f20a5e1a49837d9df4b24b1662
2024-02-28 15:35:49 -08:00
Kiyoung Kim
997951dd96 Merge "Do not dump BOARD_VNDK_VERSION" into main 2024-02-13 00:51:53 +00:00
Stephen Hines
728bb716b6 Temporarily remove toolchain/ from androidmk_denylist.go
There are defensive `Android.mk` files present in several top-level
toolchain/ projects. Enforcing the denylist strictly breaks several
builds, so this change temporarily relaxes that by removing our
directories from the list.

Test: Run Rust's test_compiler.py
Change-Id: Ic00a305b78485543d098aeea42c2d2b93f979430
2024-02-08 01:37:34 -08:00
Wei Li
d0a2e324df Show error message when Android.mk files are found in directories in the deny list.
Bug: 318567881
Test: CIs
Test: add a Android.mk file in a blocked directory(e.g. cts/) and 'm nothing', an error message should be displayed and build process is stopped.
Change-Id: I3e1f63a13a20f77576b0e7424304a661f144df53
2024-02-06 11:54:55 -08:00
Kiyoung Kim
56b9618584 Do not dump BOARD_VNDK_VERSION
Soong dumps BOARD_VNDK_VERSION to check if devices use VNDK when VNDK is
first introduced. However, VNDK is fully used from all device so this is
no longer required. Also, BOARD_VNDK_VERSION property is expected to be
deprecated along with VNDK deprecation. This change removes
BOARD_VNDK_VERSION from dump variable target.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I2fdb92a0e03629366a515d3b6705f7a7db0c1159
2024-02-06 17:04:15 +09:00
Kousik Kumar
3f1c98978b Merge "Allowlist gcloud to be run during the build" into main 2024-02-05 14:31:35 +00:00
Joe Onorato
e5ed34746e Add new soongdbg command and a big json file full of soong debugging info.
In order to use soongdbg, you must run analysis with GENERATE_SOONG_DEBUG=true set
in the environment.

Test: GENERATE_SOONG_DEBUG=true m nothing ; soongdbg ...
Change-Id: If43676fe2784f05cd87c0ecb4a46ab676b91023f
2024-02-03 14:44:11 -08:00
Kousik Kumar
be2c98d08c Allowlist gcloud to be run during the build
We obtain credentials for RBE through gcloud in case of builds on glapstations (i.e., glinux workstations at home). Hence gcloud needs to be able to run during the build for this credential fetching to work.
Related: https://b.corp.google.com/issues/320962825#comment11

Also, we no longer use prodcertstatus, so I've removed it from the allowlist.

Bug: b/320962825
Change-Id: I97ee7d53b2f490ba81ce94d13eaecb4e6a311914
Tested: ran a build on glinux workstation at home to confirm
2024-02-01 16:17:45 +00:00
Cole Faust
9a346f6da3 Remove SymlinkOutputs
symlink_outputs was added so bazel could run ninja files, but we
abanoned that approach in roboleaf, and then roboleaf was cancelled
entirely. Remove this feature so we're more compatible with upstream
ninja / n2.

Bug: 160568334
Test: Presubmits
Change-Id: Ic368c48dd01b68e51c471c3fe90d0c02c55956e9
2024-01-18 12:43:24 -08:00
Wei Li
a292446604 Update Android.mk denylist to only block the following directories in kernel/.
kernel/configs/
kernel/prebuilts/
kernel/tests/

Bug: 319658303
Test: CIs
Change-Id: I2f70ac856ec6fcf0a969aeae25eb55a730057e05
2024-01-11 23:51:42 +00:00
Colin Cross
4593e41ba6 Merge "Improve soong stuck ninja detection output" into main 2024-01-11 18:01:57 +00:00
Colin Cross
a9aa35c252 Improve soong stuck ninja detection output
Add -T to the pstree command so that it doesn't print the threads of
the running processes, the thread information hasn't been useful for
debugging any previous instances of stuck processes.

Log that there are stuck processes to stdout with a pointer to look
in soong.log.

Test: manual
Change-Id: I6459f2887a7e79591e8c451d06969f8709db3393
2024-01-10 14:43:30 -08:00
Elliott Hughes
10363161e7 "master" was renamed "main".
Test: N/A
Change-Id: I86d5578eaac260e55a9583db7ab49812b4ba1f5d
2024-01-09 22:09:07 +00:00
Wei Li
8ca410d72b Merge "Do not load Android.mk files from the directories defined in the list." into main 2024-01-03 22:27:08 +00:00
Cole Faust
16771ec9c2 Merge "Add direct deps on glob result files" into main 2024-01-03 06:14:23 +00:00
Wei Li
0d7231170f Do not load Android.mk files from the directories defined in the list.
This intial list contains the directories that don't have any Android.mk file, and this will prevent new Android.mk file being added in these directories.

Bug: 318428689
Test: CIs
Change-Id: Ifde1b77ad17b8bb2e7ba962229cee6ba267d6316
2024-01-02 19:06:48 -08:00
Cole Faust
8c0b11ef79 Add direct deps on glob result files
n2 (a reimplemntation of ninja) adds a check that depfiles only add
dependencies on source files, not generated files, because generated
files are not guaranteed to exist before an action runs if there isn't
an explicit dependency between the two.

This is the case for our glob result files. However, we can rework the
build so that they're directly depended on instead of using a depfile.

Bug: 318434287
Test: rm -rf out && m nothing && m nothing
Change-Id: I513fa5536136e6bf19c347710f0722d696199612
2024-01-02 17:02:52 -08:00
Colin Cross
a3759f98a6 Merge "Write raw files to disk instead of the ninja file" into main 2024-01-02 19:44:52 +00:00
Colin Cross
31a674571e Write raw files to disk instead of the ninja file
Writing raw files as rules in the ninja file unnecessarily bloats
the ninja file.  Write files immediately to disk instead to files
based on the hash of the contents, and then emit ninja rules to
copy the files into place during the build.  Delete obsolete files
in a singleton at the end of analysis.

Bug: 306029038
Test: Run: m libc_musl_version.h
           touch build/soong/Android.bp
           m libc_musl_version.h
      libc_musl_version.h/genrule.sbox.textproto is not recopied.
Test: Run: lunch aosp_cf_x86_64_phone-userdebug
           m libc_musl_version.h
	   lunch aosp_x86_64-userdebug
	   m libc_musl_version.h
	   lunch aosp_cf_x86_64_phone-userdebug
	   m libc_musl_version.h
      libc_musl_version.h/genrule.sbox.textproto is recopied but restat prevents rerunning the genrule.
Test: Run: touch out/soong/raw-aosp_cf_x86_64_phone/00/foo
           touch build/soong/Android.bp
	   m nothing
      out/soong/raw-aosp_cf_x86_64_phone/00/foo is removed.
Change-Id: I172869c4d49565504794c051e2e8c1f7cf46486e
2023-12-19 16:33:46 -08:00
Treehugger Robot
2fd4783584 Merge "Revert "Show ETA only if it is smart status"" into main 2023-12-19 15:49:57 +00:00
Jeongik Cha
b6d5ff505d Revert "Show ETA only if it is smart status"
Revert submission 2853087

Reason for revert: not necessary

Reverted changes: /q/submissionid:2853087

Change-Id: I747948ce5bec656851bf9a50e136bf7e3aae8df6
2023-12-19 05:44:26 +00:00
Jeongik Cha
d74c914e36 Fix typo in log in ninja.go
Test: n/a
Bug: 292304818

Change-Id: I6dcb6bb3e84e15292cbd3acc613c744e3ec039f8
2023-12-11 11:41:16 +00:00
Colin Cross
8d411ff8f8 Remove bp2build and bazel from soong_ui
Bug: 315353489
Test: m blueprint_tests
Change-Id: I9df31b18caaae24e3cf2994e56bb90b50523f11e
2023-12-07 17:14:27 -08:00
Colin Cross
31783628ff Merge "Move startRBE error handling to the main goroutine" into main 2023-12-05 05:35:38 +00:00
Jeongik Cha
340a2b8d3f Merge changes Ib785bd1c,Icd05ee3a into main
* changes:
  Show ETA only if it is smart status
  Remove not-used field in smart_status
2023-11-30 08:20:31 +00:00
Jeongik Cha
0ba68e40bb Show ETA only if it is smart status
To prevent breakage in parsing logic in build bot

Test: m
Bug: 313981966
Change-Id: Ib785bd1cf0fec92d9a4cf20ab8a33ae9590282a9
2023-11-30 00:06:26 +00:00
Jeongik Cha
adbdbc33f8 Remove not-used field in smart_status
Bug: 292304818
Test: m nothing
Change-Id: Icd05ee3af49063a01447fef9e9c3daf705f0cc4b
2023-11-30 08:58:26 +09:00
Treehugger Robot
8f7ee30d21 Merge "Support experimental building with OpenJDK 21" into main 2023-11-29 20:25:25 +00:00
Sorin Basca
0760c89882 Support experimental building with OpenJDK 21
Use EXPERIMENTAL_USE_OPENJDK21_TOOLCHAIN=true to build with OpenJDK 21
while still targeting java language version 17.

Bug: 313924276
Test: m EXPERIMENTAL_USE_OPENJDK21_TOOLCHAIN=true
Change-Id: Idc892bb7519e597f1e280ca0765c1a281bb29955
2023-11-29 19:13:55 +00:00
Jeongik Cha
3622b3464b Show estimated build end time during build
Ninja delivers estimated total build time and critical path time from
previous ninja log.

Bug: 292304818
Test: check if ETA shows
Change-Id: I014caaa3e8222a53c8822616b2ae31b88a3b0310
2023-11-29 09:57:35 +09:00
Colin Cross
e7151f971e Move startRBE error handling to the main goroutine
When called from the startRBE goroutine, the panic ctx.Fatalf triggered
by is unhandled and causes the process to exit without cleaning up the
terminal.  Move most of the quick checks to a checkRBERequirements
function called on the main goroutine so they can be reported
immediately before running Soong and Kati, and recover any panics
from startRBE and report them after waiting on rbeCh.

Bug: 293501187
Test: gcertdestroy && m nothing
Change-Id: I62c84c93ab0a7f0e4f2ab2cc64b22e2070dd6e4c
2023-11-28 22:35:37 +00:00
Jihoon Kang
2a929ad250 Revert^2 "Default from-text stub generation in build"
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.

This change relands aosp/2617457.

Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 301522358
Change-Id: Ic129dafc3231e71470af982374739930947b69cb
2023-11-08 04:25:52 +00:00
LaMont Jones
9a9128610b Readd support for PRODUCT_RELEASE_CONFIG_MAPS
This allows product config to determine what build flags are present in
a product's build, as well as their value.

As product config moves to a declarative specification, this can be
handled with less unnecessary work.

Bug: b/302593603, b/308849337, b/309477343
Test: manual
Change-Id: Ic0551990864bba6d03b6bf49fcfd4ae2523d9c6d
2023-11-07 18:39:40 +00:00