Skip to content

Commit f1897d3

Browse files
[3.11] GH-130396: Treat clang -Og as optimized for gdb tests (GH-130550) (GH-130573) (#130593)
1 parent 3abcace commit f1897d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/support/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,11 @@ def python_is_optimized():
768768
for opt in cflags.split():
769769
if opt.startswith('-O'):
770770
final_opt = opt
771-
return final_opt not in ('', '-O0', '-Og')
771+
if sysconfig.get_config_var("CC") == "gcc":
772+
non_opts = ('', '-O0', '-Og')
773+
else:
774+
non_opts = ('', '-O0')
775+
return final_opt not in non_opts
772776

773777

774778
def check_cflags_pgo():

0 commit comments

Comments
 (0)