Commit Graph

8 Commits (1e8eb1c1f2c3cb2029b9f0202d8ce5dbe18ec33d)

Author SHA1 Message Date
Fabio Alessandrelli edf02f8319 [SCons] Link MSVC debug runtime for optimize=none|debug only.
Select windows runtime in "targets" tool, use "/MDd" flag only when
building with optimize="none" and optimize="debug".
2022-11-21 11:04:10 +01:00
Fabio Alessandrelli 35ec1403dc [SCons] Remove bogus CCFLAGS from windows toolchain.
The c++ standard is added as part of the main SConstruct
2022-11-02 16:45:38 +01:00
Fabio Alessandrelli 2bf983e638 [SCons] Add "optimize" and "debug_symbols" options
optimize = auto|none|debug|speed|size|0|1|2|3
debug_symbol = True|False

optimize == "auto" will produce:
- "debug" for "debug" builds
- "speed" for "release" builds
2022-09-12 16:52:05 +02:00
Fabio Alessandrelli 081d425277 [MSVC] Add NOMINMAX flag to scons and cmake.
Ensures user inclusion of windows.h do not define "min" and "max"
macros.
2022-09-12 13:12:55 +02:00
Kevin Smith 7f44a1b44e Add debug information to Windows builds
Previously, Windows builds were being produced without debug
information, leading to somewhat unhelpful backtraces etc.
without symbols.

This builds the symbols in (only for debug builds - I've
deliberately not touched release builds here) so gdextension
bugs are a little more tractable.

Test-Information:
Have been running this patch for weeks, and getting useful
traces out on the commandline, and useful debugging from
debuggers.
2022-07-28 20:37:44 +01:00
Kevin Smith b038fe556b Add clang-cl support
Visual C++ has a clang-based driver, available through the
clang-cl wrapper (which provides the same interface as
cl) - this generates objects binary-compatible with the
default (traditional) driver, and can then be linked in
the normal way. As such, this patch simply configures for
MSVCC and then overwrites the cl compiler with clang-cl
in the environment.

Clang gives (subjectively) much more understandable compiler warnings
and errors than MSVCC, which was my motivation for switching.

Test-Information:
Builds for me with VS2022, and my gdextension library
builds and links.
2022-07-12 18:13:25 +01:00
Fabio Alessandrelli 7901986dcf [SCons] Fix msvc, linux-clang, add version check. 2022-07-04 18:00:29 +02:00
Fabio Alessandrelli 93f2091185 [SCons] Move toolchains logic to tools folder. 2022-06-27 20:44:12 +02:00