diff options
author | Jack Lloyd <[email protected]> | 2020-11-13 08:25:19 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2020-11-13 08:25:19 -0500 |
commit | b73ec4d62b1530c83315aa75e14e0a7002e1c3f4 (patch) | |
tree | 70ecf883f9fdbc20dcc568dc81e6ea5cdddb1b56 /configure.py | |
parent | d63ea114b54902128838425206ecccc0bf712e99 (diff) |
Add --compiler-cache option to configure.py
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.py b/configure.py index 8cd9411af..11c18301d 100755 --- a/configure.py +++ b/configure.py @@ -342,6 +342,9 @@ def process_command_line(args): # pylint: disable=too-many-locals,too-many-state target_group.add_option('--msvc-runtime', metavar='RT', default=None, help='specify MSVC runtime (MT, MD, MTd, MDd)') + target_group.add_option('--compiler-cache', + help='specify a compiler cache to use') + target_group.add_option('--with-endian', metavar='ORDER', default=None, help='override byte order guess') @@ -1996,6 +1999,14 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, return exe + def choose_cxx_exe(): + cxx = options.compiler_binary or cc.binary_name + + if options.compiler_cache is None: + return cxx + else: + return '%s %s' % (options.compiler_cache, cxx) + variables = { 'version_major': Version.major(), 'version_minor': Version.minor(), @@ -2100,7 +2111,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, 'python_version': options.python_version, 'install_python_module': not options.no_install_python_module, - 'cxx': (options.compiler_binary or cc.binary_name), + 'cxx': choose_cxx_exe(), 'cxx_abi_flags': cc.mach_abi_link_flags(options), 'linker': cc.linker_name or '$(CXX)', 'make_supports_phony': osinfo.basename != 'windows', |