From c51829968b91a150c73150b56fdf89e4bb34b695 Mon Sep 17 00:00:00 2001 From: Junji Watanabe Date: Fri, 13 Oct 2023 04:52:02 +0000 Subject: [PATCH] [autoninja] Update Siso .ninja_log comments Siso is going to generate non-empty .ninja_log for the analysis tools. https://crrev.com/c/4907677 This CL fixes the comment about empty ninja_log. It's not compatible with Ninja's .ninja_log. So `gn clean` will still be required. Bug: b/298594790 Change-Id: Ib4c60f3ed22f516d6f7e2847aaf57e228121eccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4937692 Auto-Submit: Junji Watanabe Commit-Queue: Junji Watanabe Reviewed-by: Takuto Ikuta --- autoninja.py | 2 +- post_build_ninja_summary.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoninja.py b/autoninja.py index 7f100d1e5..008777bae 100755 --- a/autoninja.py +++ b/autoninja.py @@ -166,11 +166,11 @@ def main(args): siso_marker = os.path.join(output_dir, '.siso_deps') if use_siso: - ninja_marker = os.path.join(output_dir, '.ninja_log') # autosiso generates a .ninja_log file so the mere existence of a # .ninja_log file doesn't imply that a ninja build was done. However # if there is a .ninja_log but no .siso_deps then that implies a # ninja build. + ninja_marker = os.path.join(output_dir, '.ninja_log') if os.path.exists(ninja_marker) and not os.path.exists(siso_marker): print('Run gn clean before switching from ninja to siso in %s' % output_dir, diff --git a/post_build_ninja_summary.py b/post_build_ninja_summary.py index 9f2f7f52a..c864b955f 100755 --- a/post_build_ninja_summary.py +++ b/post_build_ninja_summary.py @@ -117,8 +117,8 @@ def ReadTargets(log, show_all): The result is a list of Target objects.""" header = log.readline() - # TODO: b/298594790 - Siso currently generates empty .ninja_log files. - # Handle them gracefully by silently returning an empty list of targets. + # Handle empty ninja_log gracefully by silently returning an empty list of + # targets. if not header: return [] assert header == '# ninja log v5\n', \