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

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

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)
0