8000 [3.12] GH-130396: Treat clang -Og as optimized for gdb tests (GH-1305… · python/cpython@40b2e6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 40b2e6b

Browse files

vstinnermarkshannon
authored andcommitted
[3.12] GH-130396: Treat clang -Og as optimized for gdb tests (GH-130550) (GH-130573)
GH-130396: Treat clang -Og as optimized for gdb tests (GH-130550) (cherry picked from commit 129db32) (cherry picked from commit c4aeb4c) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Mark Shannon <mark@hotpy.org>
1 parent 3abcace commit 40b2e6b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/support/__init__.py

Lines changed: 5 additions & 1 deletion
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)
1615
0