Commit graph

1013 commits

Author SHA1 Message Date
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
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
Colin Cross
216ed6c918 Merge "Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"" into main 2023-11-06 22:02:50 +00:00
Colin Cross
6a4fe68cc5 Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"
Revert submission 2815850-product-flags

Reason for revert: b/309477343

Reverted changes: /q/submissionid:2815850-product-flags

Bug: 302593603
Bug: 309477343
Change-Id: I5b5a5ade1d85195c43377ed7639deba6eef86e23
2023-11-06 21:32:03 +00:00
LaMont Jones
4c01bb49da Merge "Add support for PRODUCT_RELEASE_CONFIG_MAPS" into main 2023-11-06 14:08:22 +00:00
LaMont Jones
127127b608 Add 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
Bug: b/308849337
Test: manual
Change-Id: If57622059bb7d1c33df7498321db621c0c2d30c0
2023-11-03 19:19:59 +00:00
Colin Cross
f2c51919ad Merge "Remove obsolete java version environment variables" into main 2023-11-02 17:05:06 +00:00
Treehugger Robot
87706098b0 Merge "Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"" into main 2023-11-02 08:06:39 +00:00
Colin Cross
f77b2cb534 Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"
Revert submission 2787001-product-build-flags

Reason for revert: Possible cause of b/308849337

Reverted changes: /q/submissionid:2787001-product-build-flags

Bug: 302593603
Bug: 308849337
Change-Id: Id3f27eca8d39e854dee232f072a8dc6c561bac63
2023-11-02 00:13:30 +00:00
Colin Cross
f059b2f2fc Remove obsolete java version environment variables
jdk9 and jdk11 are no longer used, remove ANDROID_JAVA9_HOME and
ANDROID_JAVA11_HOME.

Bug: 221270882
Test: treehugger
Change-Id: Iad566bff21055c5e2acd62642ccd579507e21fef
2023-11-01 20:58:30 +00:00
Colin Cross
2650f35faa Merge "Use correct path for soong_build_metrics.pb when dist is enabled" into main 2023-11-01 16:54:14 +00:00
LaMont Jones
c416ddd1cc Merge "Add support for PRODUCT_RELEASE_CONFIG_MAPS" into main 2023-11-01 16:01:08 +00:00
Colin Cross
b67b061baa Use correct path for soong_build_metrics.pb when dist is enabled
When dist is enabled soong_build_metrics.pb is written to $DIST_DIR/logs,
not $OUT_DIR.

Test: m dist nothing, examine out/dist/logs/bulid.trace.gz
Change-Id: Ia41de6c838ecbcf0acca1e7ec7e68ba24dce2b32
2023-10-31 23:52:38 +00:00
LaMont Jones
772e21ba27 Add 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
Test: manual
Change-Id: If6ae19e3da8471eaba8d6e048769f8ac6b244155
2023-10-31 18:47:18 +00:00
Christopher Parsons
9e5abfecc9 Merge "Delete bazel-related files while bazel is off" into main 2023-10-31 15:00:17 +00:00
Colin Cross
66d6409e06 Merge "Add performance counter metrics to build.trace.gz" into main 2023-10-30 22:21:14 +00:00
Chris Parsons
b6d6fc9c63 Delete bazel-related files while bazel is off
Bug: 189485959
Test: Manually verified that files are removed
Test: Presubmits
Change-Id: Ia279937d6d335174776ff661ab20c7821b979ca7
2023-10-30 21:33:10 +00:00
Colin Cross
ab766b40e8 Merge "Copy soong_build metrics into build.trace.gz" into main 2023-10-30 19:40:31 +00:00