commit | a8a65e5f80729d430b31138216b79bddb7f3300d | [log] [tgz] |
---|---|---|
author | Fumitoshi Ukai <[email protected]> | Tue Jul 01 05:23:01 2025 |
committer | Chromium LUCI CQ <[email protected]> | Tue Jul 01 05:23:01 2025 |
tree | 300e84c2e6eae20a3684405454a26c3a6a6f7188 | |
parent | 5f55d0d0a8b30fdb3b64a49bb48b64d59270ae7b [diff] [blame] |
use atomic_output for write_depfile Suspect android_build_server would run lint.py asynchronously, and it would rewrite depfile (*.d) when siso doesn't recognize. It makes *.d not clean, and need to check all build steps for nop build. To mitigate this, use atomic_output, so not update mtime of depfile when depfile content is the same as before. Bug: 428258115 Change-Id: I737e54872774b1e7fe163c021700054036cfc1fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6692592 Auto-Submit: Fumitoshi Ukai <[email protected]> Reviewed-by: Andrew Grieve <[email protected]> Commit-Queue: Fumitoshi Ukai <[email protected]> Cr-Commit-Position: refs/heads/main@{#1480864}
diff --git a/build/action_helpers.py b/build/action_helpers.py index 48d8ae5..7399716 100644 --- a/build/action_helpers.py +++ b/build/action_helpers.py
@@ -103,7 +103,8 @@ path = pathlib.Path(depfile_path) path.parent.mkdir(parents=True, exist_ok=True) - path.write_text(''.join(sb)) + with atomic_output(str(path), mode='w', encoding='utf-8') as w: + w.write(''.join(sb)) def parse_gn_list(value):