Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b62bbf

Browse files
committed
Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.
2 parents ce2c584 + 3d6c784 commit 8b62bbf

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ Library
2626
argument which, if set to True, will pass messages to handlers taking handler
2727
levels into account.
2828

29+
Build
30+
-----
31+
32+
- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
33+
the resulting executable faster.
34+
2935

3036
What's New in Python 3.5 alpha 1?
3137
=================================

configure

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6338,7 +6338,11 @@ then
63386338
if test "$Py_DEBUG" = 'true' ; then
63396339
# Optimization messes up debuggers, so turn it off for
63406340
# debug builds.
6341-
OPT="-g -O0 -Wall $STRICT_PROTO"
6341+
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6342+
OPT="-g -Og -Wall $STRICT_PROTO"
6343+
else
6344+
OPT="-g -O0 -Wall $STRICT_PROTO"
6345+
fi
63426346
else
63436347
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
63446348
fi

configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,11 @@ then
11281128
if test "$Py_DEBUG" = 'true' ; then
11291129
# Optimization messes up debuggers, so turn it off for
11301130
# debug builds.
1131-
OPT="-g -O0 -Wall $STRICT_PROTO"
1131+
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
1132+
OPT="-g -Og -Wall $STRICT_PROTO"
1133+
else
1134+
OPT="-g -O0 -Wall $STRICT_PROTO"
1135+
fi
11321136
else
11331137
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
11341138
fi

0 commit comments

Comments
 (0)