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 | |
parent | 083f699c30d584ac59453139e4f2e03d1fde0545 (diff) |
Windows/VC build fixes
-rwxr-xr-x | configure.py | 25 | ||||
-rw-r--r-- | src/build-data/cc/msvc.txt | 2 |
2 files changed, 14 insertions, 13 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())))) diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index 7b2a13191..4529893ac 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -10,7 +10,7 @@ add_lib_option "" no_debug_flags "/O2" debug_flags "/Od /Zi /DDEBUG" -app_opt_flags "/O2 /D_CONSOLE" +app_opt_flags "/D_CONSOLE" lang_flags "/EHs /GR" warning_flags "/W3 /wd4275 /wd4267" |