Skip to content

Commit

Permalink
[3.12] pythonGH-130396: Treat clang -Og as optimized for gdb tests (p…
Browse files Browse the repository at this point in the history
…ythonGH-130550) (pythonGH-130573)

pythonGH-130396: Treat clang -Og as optimized for gdb tests (pythonGH-130550)

(cherry picked from commit 129db32)
(cherry picked from commit c4aeb4c)

Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Mark Shannon <[email protected]>
  • Loading branch information
2 people authored and miss-islington committed Feb 26, 2025
1 parent 3abcace commit 40b2e6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,11 @@ def python_is_optimized():
for opt in cflags.split():
if opt.startswith('-O'):
final_opt = opt
return final_opt not in ('', '-O0', '-Og')
if sysconfig.get_config_var("CC") == "gcc":
non_opts = ('', '-O0', '-Og')
else:
non_opts = ('', '-O0')
return final_opt not in non_opts


def check_cflags_pgo():
Expand Down

0 comments on commit 40b2e6b

Please sign in to comment.