Replies: 1 comment
-
I've always defined my own |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Requesting some feedback from anyone who has an opinion on this:
Right now,
_DEBUG
gets defined in all*-pc-windows-msvc
builds when a build configuration has debugging symbols. This is not consistent with GNU-based toolchains where it's not defined automatically for you, and something I've been on the fence about changing.Should this get defined by other toolchains as well? I have a tendency to add
"defines[:debug]": [ "_DEBUG" ]
in projects anyway, and use that to define my own project-specific debug macro (orNDEBUG
if using assert) in the PCH somewhere.Additional notes:
_MT
,_DLL
and_DEBUG
could all get defined by MSVC via/MTd
and/MDd
. If compiling windows targets via clang, they get set manually right now to mimic the behavior__OPTIMIZE__
is the way to query this on GCC/clangCurious about other's thoughts on this topic.
👍 Yes, automatically define
_DEBUG
👎 No, undefine _DEBUG in
pc-windows-msvc
👀 No, leave this behaviors as-is
Beta Was this translation helpful? Give feedback.
All reactions