diff options
author | Gary Oberbrunner <garyo@darkstarsystems.com> | 2018-03-02 14:51:29 -0500 |
---|---|---|
committer | Gary Oberbrunner <garyo@darkstarsystems.com> | 2018-03-13 09:51:05 -0400 |
commit | d1318ee12c6c19bba899ce97e46a30c461ebac44 (patch) | |
tree | 44b57f1fbfe24c8b1f5fee10343b9fd6d692f08a /modules/mono/editor/bindings_generator.cpp | |
parent | a5476f85629ca432e7434419fdeb5f38de68c207 (diff) |
Enable SCons to autodetect Windows MSVC compiler
SCons has good compiler detection logic for MSVC compilers. Up to now,
Godot hasn't used it; it depends on passed-in OS environment vars from
a specific Visual Studio cmd.exe windows. This makes it harder to
build from a msys or cygwin shell.
This change allows SCons to autodetect Visual Studio unless it sees
VCINSTALLDIR in the os.environ. It also adds a 'msvc_version' arg for
manual specification of compiler version, and uses the existing 'bits'
arg to specify the target architecture. More detail could be added as
desired. It also adds 'use_mingw' to always use mingw, even if Visual
Studio is installed. That uses the existing mingw setup logic.
If people are used to building Godot in a Visual Studio cmd window,
this should not change the behavior in that case, since VCINSTALLDIR
will be set in those windows. (However, note that you could now unset
that var and build with any other MSVC version or target arch, even in
that window.)
I refactored much of platform/windows/detect.py during this, to
simplify and clarify the logic. I also cleaned up a bunch of env var
settings in windows/detect.py and SConstruct to use modern SCons
idioms and simplify things.
I suspect this will also enable using the Intel compiler on Windows,
though that hasn't been tested.
Diffstat (limited to 'modules/mono/editor/bindings_generator.cpp')
0 files changed, 0 insertions, 0 deletions