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
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
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
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
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
Ninja delivers estimated total build time and critical path time from
previous ninja log.
Bug: 292304818
Test: check if ETA shows
Change-Id: I014caaa3e8222a53c8822616b2ae31b88a3b0310
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
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
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
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
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
jdk9 and jdk11 are no longer used, remove ANDROID_JAVA9_HOME and
ANDROID_JAVA11_HOME.
Bug: 221270882
Test: treehugger
Change-Id: Iad566bff21055c5e2acd62642ccd579507e21fef
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
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
Start a background goroutine at the beginning of soong_build that
captures the CPU usage, heap size, and total system memory every
second. Propagate the values through soong_build_metrics.pb back
to soong_ui, and then into build.trace.gz.
Test: m nothing, examine build.trace.gz
Change-Id: Iad99f8f1f088f4f7f7d5f76566a38c0c4f4d0daa
Make soong_ui read soong_build_metrics.bp to extract the event timings
and propagate them to Tracer, which will put them in build.trace.gz.
This provides much better visibility into what parts of the build are
contributing to the overly large analysis time.
Test: m nothing and examine build.trace.gz
Change-Id: I473727f1ec044b0d973f2cb4e3eaca96bfca94f6
Disable running the Soong tests when building on Linux. The tests
are still enabled when running on Darwin to ensure we have test on
Darwin in CI. Checkbuilds still depend on the tests, which will
provide test coverage in CI on Linux.
Bug: 269296618
Test: aninja -t path checkbuild out/host/linux-x86/bin/go/soong-java/test/test.passed
Test: m nothing
Change-Id: Ib8359ff6d2a92eeb2ac9a9e95ecd65abc4e40061
This reverts commit 182b56b870.
Reason for revert: prime suspect for breaking boot tests b/307495247, b/307411752
Bug:307495247
Change-Id: Iea05703b767d2699ca3cf69377eb44b1d21697ad
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.
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: 274805756
Change-Id: I28834f92c1b1311e3fe0a71a6ea9e8ec2e278d7e
With https://team-review.git.corp.google.com/c/foundry-x/re-client/+/2045536, reclient is starting to use gcertstatus instead of prodcertstatus to check for validity of google prod creds.
I'll remove the allowlist for prodcertstatus in a subsequent CL after new reclient is released.
Bug: b/169675226
Change-Id: I0e760c863d534b7a5744daf5f89f530be3d296ff