Create Make flags to set source tree as ReadOnly in soong builds

The following two Make vars control RO/RW access to the source tree
1. BUILD_BROKEN_SRC_DIR_IS_WRITABLE
2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST

By default, (1) will be truthy.
- this ensures that this CL is a non breaking change across all products
- different products can opt in to set is as "false"

Bug: 174726238
Test: from build/soong dir, ran go test ./ui/build
Change-Id: I4d55ac74f02b2a73194d31506a9010162620b25a
This commit is contained in:
Spandan Das
2021-05-25 19:14:02 +00:00
parent f6840284b6
commit a3639e62cd
6 changed files with 174 additions and 3 deletions

View File

@@ -60,6 +60,7 @@ bootstrap_go_package {
"path.go",
"proc_sync.go",
"rbe.go",
"sandbox_config.go",
"signal.go",
"soong.go",
"test_build.go",
@@ -86,5 +87,8 @@ bootstrap_go_package {
"config_linux.go",
"sandbox_linux.go",
],
testSrcs: [
"sandbox_linux_test.go",
],
},
}