Skip to content

Commit 909fe79

Browse files
committed
Treat clang -Og as optimized for gdb tests
1 parent fa6a814 commit 909fe79

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎Lib/test/support/__init__.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,15 +835,18 @@ def gc_threshold(*args):
835835
finally:
836836
gc.set_threshold(*old_threshold)
837837

838-
839838
defpython_is_optimized():
840839
"""Find if Python was built with optimizations."""
841840
cflags=sysconfig.get_config_var('PY_CFLAGS') or''
842841
final_opt=""
843842
foroptincflags.split():
844843
ifopt.startswith('-O'):
845844
final_opt=opt
846-
returnfinal_optnotin ('', '-O0', '-Og')
845+
ifsysconfig.get_config_var("CC") =="gcc":
846+
non_opts= ('', '-O0', '-Og')
847+
else:
848+
non_opts= ('', '-O0')
849+
returnfinal_optnotinnon_opts
847850

848851

849852
defcheck_cflags_pgo():

0 commit comments

Comments
 (0)