Skip to content

Commit e3d22cd

Browse files
Alexpuxlazka
authored andcommitted
configure: define _DEBUG for a debug build
The Windows code expects it in some places for a debug build Skip some things which fail to link with _DEBUG
1 parent a419526 commit e3d22cd

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Modules/_winapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ static PyObject *
14911491
_winapi_ExitProcess_impl(PyObject *module, UINT ExitCode)
14921492
/*[clinic end generated code: output=a387deb651175301 input=4f05466a9406c558]*/
14931493
{
1494-
#if defined(Py_DEBUG)
1494+
#if defined(Py_DEBUG) && defined(_MSC_VER)
14951495
#ifdef MS_WINDOWS_DESKTOP
14961496
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|
14971497
SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);

PC/clinic/msvcrtmodule.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,6 +2469,7 @@ _RESTORE_VAR([CFLAGS])
24692469
PYDEBUG_CFLAGS="-O0"
24702470
AS_VAR_IF([ac_cv_cc_supports_og], [yes],
24712471
[PYDEBUG_CFLAGS="-Og"])
2472+
PYDEBUG_CFLAGS="-D_DEBUG $PYDEBUG_CFLAGS"
24722473

24732474
# tweak OPT based on compiler and platform, only if the user didn't set
24742475
# it on the command line

0 commit comments

Comments
 (0)