mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Developers will be able to use `autosiso` command to invoke siso builds. This CL extracts reclient management logic from `ninja_reclient` to be reused in both Ninja and Siso builds. Bug: b/278675516 Change-Id: I3e64a3188db184f4d3f851063a0feef7d3a73d6d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4445366 Auto-Submit: Junji Watanabe <jwata@google.com> Reviewed-by: Philipp Wollermann <philwo@google.com> Commit-Queue: Joanna Wang <jojwang@chromium.org> Reviewed-by: Fumitoshi Ukai <ukai@google.com> Reviewed-by: Takuto Ikuta <tikuta@chromium.org> Reviewed-by: Joanna Wang <jojwang@chromium.org>
28 lines
742 B
Python
Executable File
28 lines
742 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright 2023 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
"""This script is a wrapper around the ninja.py script that also
|
|
handles the client lifecycle safely. It will automatically start
|
|
reproxy before running ninja and stop reproxy when ninja stops
|
|
for any reason eg. build completes, keyboard interupt etc."""
|
|
|
|
import sys
|
|
|
|
import ninja
|
|
import reclient_helper
|
|
|
|
|
|
def main(argv):
|
|
with reclient_helper.build_context(argv) as ret_code:
|
|
if ret_code:
|
|
return ret_code
|
|
try:
|
|
return ninja.main(argv)
|
|
except KeyboardInterrupt:
|
|
return 1
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main(sys.argv))
|