0

build: Stop clobber.py to remove out/* files

There is no clear reason to remove files located under "out" directly.
This CL stops removing those files.

Bug: 366333579
Change-Id: I10ede7f86acb24e13f16825daa8bb3357d7ce2de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5869209
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1356238}
This commit is contained in:
Junji Watanabe
2024-09-17 01:40:22 +00:00
committed by Chromium LUCI CQ
parent 178af2f2fc
commit 76a935b550

@ -119,15 +119,13 @@ build build.ninja: gn
def clobber(out_dir):
"""Clobber contents of build directory.
"""Clobber contents of build sub directories.
Don't delete the directory itself: some checkouts have the build directory
mounted."""
for f in os.listdir(out_dir):
path = os.path.join(out_dir, f)
if os.path.isfile(path):
os.unlink(path)
elif os.path.isdir(path):
if os.path.isdir(path):
delete_build_dir(path)