Commit graph

1043 commits

Author SHA1 Message Date
daniml3
d44bc5b281
sandbox_linux: set CCACHE_DIR as a writable path
Fixes "Read-only file system" error when using ccache.

NOTE: This is only required when both ccache exec and dir are on the
same partition.

Change-Id: I99afe644c8ee0e0b881c1643fef0cb31b83bcd17
2024-10-24 19:38:10 +02:00
LuK1337
277672eab4
cleanbuild: Add install to installclean files
Change-Id: Ib46d9638a2b3648d5e2ade1dfa864bc4e2ae695c
2024-10-24 19:37:55 +02:00
Jarl-Penguin
7e2044fa35
cleanbuild: Add recovery_kernel to installclean files
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: I89b7093be92cb22a223033f9a7269624f7293c35
2024-10-24 19:37:52 +02:00
Julian Veit
a7671f2808
cleanbuild: add *.zip.sha256sum to installclean_files
Change-Id: I91f92349423eeb99e7e4521f6239baabe8b1314c
2024-10-24 19:37:47 +02:00
HeroBuxx
fee41a1895
soong: ui: dumpvar: Apparently PRODUCT_SOONG_NAMESPACES is necessary
Bring back PRODUCT_SOONG_NAMESPACES after this change:
3690485a16

Change-Id: I1efa7620d79eb9c330f0f028a91e10d2a9ce49e8
Signed-off-by: HeroBuxx <me@herobuxx.me>
2024-10-24 19:37:38 +02:00
Rashed Abdel-Tawab
c4ec0f2daa
soong: Add TEQUILA_VERSION to dumpvars
Change-Id: I24b29442f041aec451a173db404f542060ac67d2
2024-10-24 19:36:20 +02:00
Treehugger Robot
1571ad9605 Merge "Add following directories to Android.mk denylist to block new Android.mk files." into main 2024-06-13 23:43:25 +00:00
Cole Faust
1ae7b774eb Remove timestamp from local build number
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
2024-06-13 10:27:20 -07:00
Wei Li
8778d26c9d Add following directories to Android.mk denylist to block new Android.mk files.
bionic/
development/
device/sample/
prebuilts/
sdk/
test/
trusty/

Bug: 318428689
Change-Id: I327bf354df064a5249edc3e9c846199cde0ce00b
Test: CIs
2024-06-12 21:13:24 +00:00
Spandan Das
02f1e342cd Merge "Drop PRODUCT_INCLUDE_TAGS from banner vars" into main 2024-06-07 16:01:21 +00:00
Treehugger Robot
620b0c46d9 Merge "Regard out/soong/release-config as a source directory" into main 2024-06-07 05:12:31 +00:00
Spandan Das
f4c802bcd6 Drop PRODUCT_INCLUDE_TAGS from banner vars
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
2024-06-07 00:03:20 +00:00
Justin Yun
605b5da192 Regard out/soong/release-config as a source directory
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
2024-06-04 11:28:31 +09:00
Spandan Das
aa9369b71d Drop IncludeTags
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
2024-05-22 19:23:47 +00:00
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