Dump bazel product config in Soong

Bug: 187862880
Test: build/bazel/ci/bp2build.sh
Test: build/soong/tests/bp2build_bazel_test.sh
Change-Id: I24b09baad973e25bec4476e1ea4a7692b72b7d20
This commit is contained in:
Liz Kammer
2021-05-12 14:51:49 -04:00
parent b1caeb0768
commit 09f947d67e
7 changed files with 54 additions and 15 deletions

View File

@@ -1990,6 +1990,10 @@ func RemoveAllOutputDir(path WritablePath) error {
func CreateOutputDirIfNonexistent(path WritablePath, perm os.FileMode) error {
dir := absolutePath(path.String())
return createDirIfNonexistent(dir, perm)
}
func createDirIfNonexistent(dir string, perm os.FileMode) error {
if _, err := os.Stat(dir); os.IsNotExist(err) {
return os.MkdirAll(dir, os.ModePerm)
} else {