diff options
Diffstat (limited to 'third_party/waf/waflib/Tools/msvc.py')
-rw-r--r-- | third_party/waf/waflib/Tools/msvc.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/third_party/waf/waflib/Tools/msvc.py b/third_party/waf/waflib/Tools/msvc.py index 9ee7eadcdbe..17b347d4583 100644 --- a/third_party/waf/waflib/Tools/msvc.py +++ b/third_party/waf/waflib/Tools/msvc.py @@ -1,7 +1,3 @@ -#! /usr/bin/env python -# encoding: utf-8 -# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file - #!/usr/bin/env python # encoding: utf-8 # Carlos Rafael Giani, 2006 (dv) @@ -12,6 +8,12 @@ """ Microsoft Visual C++/Intel C++ compiler support +If you get detection problems, first try any of the following:: + + chcp 65001 + set PYTHONIOENCODING=... + set PYTHONLEGACYWINDOWSSTDIO=1 + Usage:: $ waf configure --msvc_version="msvc 10.0,msvc 9.0" --msvc_target="x64" @@ -461,10 +463,8 @@ def gather_vswhere_versions(conf, versions): return if sys.version_info[0] < 3: - try: - txt = txt.decode(sys.stdout.encoding or 'cp1252') - except UnicodeError: - txt = txt.decode('utf-8', 'replace') + txt = txt.decode(Utils.console_encoding()) + arr = json.loads(txt) arr.sort(key=lambda x: x['installationVersion']) for entry in arr: @@ -940,6 +940,8 @@ def msvc_common_flags(conf): v.cprogram_PATTERN = v.cxxprogram_PATTERN = '%s.exe' + v.def_PATTERN = '/def:%s' + ####################################################################################################### ##### conf above, build below |