diff options
author | lloyd <[email protected]> | 2014-10-31 11:51:42 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-10-31 11:51:42 +0000 |
commit | d623823e7e0d2754343ab498f48976e91180d24f (patch) | |
tree | 7632024ea8a3287c692312cb42038573837d2b68 /configure.py | |
parent | 083f699c30d584ac59453139e4f2e03d1fde0545 (diff) |
Windows/VC build fixes
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/configure.py b/configure.py index 30b5ef551..ab363a5ba 100755 --- a/configure.py +++ b/configure.py @@ -1524,7 +1524,7 @@ def setup_build(build_config, options, template_vars): def choose_link_method(req_method): def useable_methods(): - if 'symlink' in os.__dict__: + if 'symlink' in os.__dict__ and options.os != 'windows': yield 'symlink' if 'link' in os.__dict__: yield 'hardlink' @@ -1812,6 +1812,7 @@ def have_program(program): if exe_test(path, program + suffix): return True + logging.debug('Program %s not found' % (program)) return False """ @@ -1868,17 +1869,6 @@ def main(argv = None): if options.os is None and len(chost) > 2: options.os = '-'.join(chost[2:]) - if options.compiler is None: - if options.os == 'windows': - if have_program('g++') and not have_program('cl'): - options.compiler = 'gcc' - else: - options.compiler = 'msvc' - else: - options.compiler = 'gcc' - logging.info('Guessing to use compiler %s (use --cc to set)' % ( - options.compiler)) - if options.os is None: options.os = platform.system().lower() @@ -1891,6 +1881,17 @@ def main(argv = None): logging.info('Guessing target OS is %s (use --os to set)' % (options.os)) + if options.compiler is None: + if options.os == 'windows': + if have_program('g++') and not have_program('cl'): + options.compiler = 'gcc' + else: + options.compiler = 'msvc' + else: + options.compiler = 'gcc' + logging.info('Guessing to use compiler %s (use --cc to set)' % ( + options.compiler)) + if options.compiler not in ccinfo: raise Exception('Unknown compiler "%s"; available options: %s' % ( options.compiler, ' '.join(sorted(ccinfo.keys())))) |