Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.

This commit is contained in:
Antoine Pitrou 2015-02-11 19:41:01 +01:00
commit 8b62bbf2e5
3 changed files with 16 additions and 2 deletions

View File

@ -26,6 +26,12 @@ Library
argument which, if set to True, will pass messages to handlers taking handler argument which, if set to True, will pass messages to handlers taking handler
levels into account. levels into account.
Build
-----
- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
the resulting executable faster.
What's New in Python 3.5 alpha 1? What's New in Python 3.5 alpha 1?
================================= =================================

4
configure vendored
View File

@ -6338,7 +6338,11 @@ then
if test "$Py_DEBUG" = 'true' ; then if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for # Optimization messes up debuggers, so turn it off for
# debug builds. # debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
OPT="-g -Og -Wall $STRICT_PROTO"
else
OPT="-g -O0 -Wall $STRICT_PROTO" OPT="-g -O0 -Wall $STRICT_PROTO"
fi
else else
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
fi fi

View File

@ -1128,7 +1128,11 @@ then
if test "$Py_DEBUG" = 'true' ; then if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for # Optimization messes up debuggers, so turn it off for
# debug builds. # debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
OPT="-g -Og -Wall $STRICT_PROTO"
else
OPT="-g -O0 -Wall $STRICT_PROTO" OPT="-g -O0 -Wall $STRICT_PROTO"
fi
else else
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
fi fi