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
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
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
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
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
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