aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2024-05-01 22:23:14 -0700
committerPirama Arumuga Nainar <pirama@google.com>2024-05-02 09:44:13 -0700
commita088ebfd5ddb8b1d0e8f93f8ea5a353e69298de5 (patch)
tree92059582c6050e7a9dea51c7b73ea029ba1a6113
parent5e57e31c4a228cfec065188b7c62a78cd8858ff1 (diff)
downloadllvm_android-a088ebfd5ddb8b1d0e8f93f8ea5a353e69298de5.tar.gz
build: default to incremental build
Bug: http://b/300494075 Post-submit builds are no longer incremental, so default to an incremental build but print contents of OUT_DIR for debugging purposes. Test: build.py locally and presubmit Change-Id: I08d17096386d4bba372735cd798cd48757e73967
-rwxr-xr-xdo_build.py7
-rw-r--r--utils.py1
2 files changed, 5 insertions, 3 deletions
diff --git a/do_build.py b/do_build.py
index 8408d47..bb9a63a 100755
--- a/do_build.py
+++ b/do_build.py
@@ -944,12 +944,12 @@ def parse_args():
incremental_group.add_argument(
'--incremental',
action='store_true',
- default=False,
+ default=True,
help='Keep paths.OUT_DIR if it exists')
incremental_group.add_argument(
'--no-incremental',
action='store_false',
- default=False,
+ default=True,
dest='incremental',
help='Delete paths.OUT_DIR if it exists (default)')
@@ -965,7 +965,8 @@ def main():
logger().info(f'Removing {paths.OUT_DIR}')
utils.clean_out_dir()
else:
- logger().info(f'Keeping older build in {paths.OUT_DIR}')
+ out_dir_items = ' '.join(map(str, paths.OUT_DIR.iterdir()))
+ logger().info(f'Keeping older build in {paths.OUT_DIR}: {out_dir_items}')
timer.Timer.register_atexit(paths.DIST_DIR / 'build_times.txt')
diff --git a/utils.py b/utils.py
index da0d427..ea3993c 100644
--- a/utils.py
+++ b/utils.py
@@ -155,6 +155,7 @@ def clean_out_dir():
for child in paths.OUT_DIR.iterdir():
if child.name == 'prebuilt_cached':
continue
+ logger().info(f'removing {child} in {paths.OUT_DIR}')
if child.is_dir():
shutil.rmtree(child)
else: