* changes:
Convert sdk mutator to TransitionMutator
Convert link mutator to TransitionMutator
Convert version mutator to TransitionMutator
Convert python_version mutator to TransitionMutator
Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
Replace rust.LibraryMutator and rust.LibstdMutator with
TransitionMutators.
Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Test: no change to build.ninja
Change-Id: Ia24a582119d39889279d7b93bac9259685153619
Summary: When build failures occur, it can be hard to find where the error message begins. We now highlight "FAILURE" in red to make it easier to see what exactly has failed in the output.
Test: execute automated tests with m nothing --no-skip-soong-tests, can also manually test with a build failure and observe red text in the output
Change-Id: Iad3b94cc1c385f0afdebdf12c44843db04ff2bdc
Signed-off-by: Cherokee Toole <cherokee@meta.com>
If `SOONG_USE_N2=true` is set in the environment, then n2 is used in
place of ninja. Some ninja features are not available in n2 at this
time, but this enables bringup efforts to happen in parallel.
Bug: 352368206
Test: manual
Change-Id: I8455cb24eb640a4651782ee76e48a7d3a9932b93
Some linux environments export LEX and this variable must be unset to
ensure Soong and Make LEX values match.
Change-Id: I8ff2b62a49e0108575ff88b1a88a83d650fc3768
This reverts commit fddc3dc8d3.
Reason for revert: https://r.android.com/3148741 makes this compatible with art gtests
Change-Id: Ia85c60fdcfa3142fc464a35476170c88c172989c
Missing output files in ninja execution will be treated as errors.
Products can bypass this using the newly introduced
BUILD_BROKEN_MISSING_OUTPUTS flag.
Test: m nothing # verified missingoutfile appears in out/soong.log
Test: checkbuild passes on presubmits
Change-Id: I4eebcd08aa57fc6ccf1688c32e0d1fe06d66ab9a
product_config module will export productVariables struct (defined in
android/variable.go). Other modules can depend on product_Config module
to read product variables, without needing to update Soong.
Bug: 346214955
Test: build and see output of product_config module
Change-Id: I06e1d2716dc2a8b90984bb46c5fc901cd1ca5020
The build_info.prop file was converted to soong, which then caused it to
have a stale build number due to not adding the build number file as a
dependency to avoid rebuilds. I added it as a dependency to fix the
staleness, but it always rebuilds locally now.
I think the way it worked before, it would get stale build numbers,
except that it was cleared with installclean which was always run on CI.
Now that it's a soong module and generated in out/soong/.intermediates
it's not cleared by installclean. I could make a system to register
files that should be installclean'd from a soong module, but I'd
eventually like to eliminate the need to run installclean entirely.
So as an alternative, just make the build number not change every build
when doing local builds, by removing the timestamp from it.
Bug: 346757289
Test: m repeatedly and observe no rebuilds the second time (of the system image, the build flags infrastructure seems to do some small rebuilding)
Change-Id: I0207feb739523dde3e89d1e5c4822865f641c313
PRODUCT_INCLUDE_TAGS was previously used alongside
blueprint_package_include to prune Android.bp files from soong analysis.
With the deprecation of blueprint_package_includes, this product config
variable bcomes a noop and does not provide useful information in
banner.
Test: NA
Bug: 333316620
Change-Id: Id7a1465c06a45f12b4ecb1bf80decddb657adce2
Files in out/soong/release-config are generated from lunch or kati
configuration phase. They don't have rules in ninja, but always
provided as source files.
Bug: 324996303
Test: m checkbuild
Change-Id: Ibfb76a8c58a81a4d768b29d80151fa47e2ebb9c1
This was previously used in conjunction with blueprint_package_includes
to prune Android.bp files from soong analysis.
Test: m nothing
Bug: 308188212
Change-Id: Ie82e20eec63bd0be70e1cf0290c70f62d5621c76
RBE is now the default for all Google internal builds, so this warning
is no longer necessary.
Bug: n/a
Change-Id: I2da3e9b84c20f32b3e3f90f49a974512248db2ec
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
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
The .build-id directory tree is as described here:
https://fedoraproject.org/wiki/RolandMcGrath/BuildID
Tools such as llvm-symbolizer understand this tree and can use it
to look up symbols by build ID. This CL adds a post-build step that
updates the .build-id directory under symbols after every build if
necessary to contain symlinks to the corresponding symbols file.
I also considered adding this as a build step after copying the symbol
file to the symbols directory. However this would be complicated
by the fact that many binaries have the same build-id such as the
various copies of libc++ for the different APEXes. As a result it
would be difficult to implement a .build-id updater that produces a
correct symlink tree while taking into account concurrent updates to
the same symlink by different build steps. This situation is resolved
in the .build-id directory generator by having the symlink point to
the lexically smallest path out of all paths with the same build-id.
I measured the performance of the UpdateBuildIdDir function by writing
a standalone program that just calls the function and running it over
a copy of the symbols directory for a specific target. On my machine
the execution time of the program when simulating various scenarios
was as follows:
Null build [1]: 36.2 ms ± 3.4 ms
Initial build [2]: 162.3 ms ± 6.6 ms
Single update [3]: 128.0 ms ± 6.1 ms
Invalid .build-id dir [4]: 222.6 ms ± 8.6 ms
This is with some improvements that have been contributed to the Go
standard library [5,6]; without those improvements a null build is
37.9 ms ± 4.4 ms and a single update is 143.9 ms ± 4.5 ms.
[1] hyperfine './update-build-id ~/2/test-symbols2/'
[2] hyperfine -p 'rm -rf ~/2/test-symbols2/.build-id' './update-build-id ~/2/test-symbols2/'
[3] hyperfine -p 'dd if=/dev/urandom of=$HOME/2/test-symbols2/system/bin/init conv=notrunc seek=808 bs=1 count=16' './update-build-id ~/2/test-symbols2/'
[4] hyperfine -p 'touch ~/2/test-symbols2/.build-id/corrupt; sleep 0.1; touch ~/2/test-symbols2/system/bin/init' './update-build-id ~/2/test-symbols2/'
[5] https://go.dev/cl/570877
[6] https://go.dev/cl/571436
Bug: 328702178
Change-Id: I8fc0ea81bd31ec80d6b912ba477e2e24b6b05f68
This reverts commit b832ae19d8.
Reason for revert: Reland Switch to JDK 21 when related issues are resolved.
Bug: 313924276
Change-Id: Ibb5031d9892d1ddc5bc4d2af9885c3192b8ac8ad
Test: TH
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
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
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
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