From 603a47266ea19c42f028ad311d5b26195222a04a Mon Sep 17 00:00:00 2001 From: Ross Bayer Date: Fri, 24 Jan 2020 01:49:09 -0800 Subject: [PATCH] [Build System: build-script] Allow users to enable distcc via the USE_DISTCC environment variable. --- utils/build-script | 3 ++- utils/build_swift/build_swift/driver_arguments.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/build-script b/utils/build-script index 76ea91f740d65..120f75a5cd928 100755 --- a/utils/build-script +++ b/utils/build-script @@ -923,7 +923,8 @@ def main_preset(): "--distcc", help="use distcc", action=argparse.actions.StoreTrueAction, - nargs=argparse.Nargs.OPTIONAL) + nargs=argparse.Nargs.OPTIONAL, + default=os.environ.get('USE_DISTCC') == '1') parser.add_argument( "--cmake-c-launcher", help="the absolute path to set CMAKE_C_COMPILER_LAUNCHER", diff --git a/utils/build_swift/build_swift/driver_arguments.py b/utils/build_swift/build_swift/driver_arguments.py index 1f1587c5b20d0..108ea4793315a 100644 --- a/utils/build_swift/build_swift/driver_arguments.py +++ b/utils/build_swift/build_swift/driver_arguments.py @@ -400,6 +400,7 @@ def create_argument_parser(): option('--host-libtool', store_path(executable=True), help='the absolute path to libtool. Default is auto detected.') option('--distcc', toggle_true, + default=os.environ.get('USE_DISTCC') == '1', help='use distcc in pump mode') option('--enable-asan', toggle_true, help='enable Address Sanitizer')