Skip to content

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 43a2a37

Browse filesBrowse files
[3.13] GH-130396: Treat clang -Og as optimized for gdb tests (GH-130550) (#130572)
GH-130396: Treat clang -Og as optimized for gdb tests (GH-130550) (cherry picked from commit 129db32) Co-authored-by: Mark Shannon <mark@hotpy.org>
1 parent 2ab7e11 commit 43a2a37
Copy full SHA for 43a2a37

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed

‎Lib/test/support/__init__.py

Copy file name to clipboardExpand all lines: Lib/test/support/__init__.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,15 +833,18 @@ def gc_threshold(*args):
833833
finally:
834834
gc.set_threshold(*old_threshold)
835835

836-
837836
def python_is_optimized():
838837
"""Find if Python was built with optimizations."""
839838
cflags = sysconfig.get_config_var('PY_CFLAGS') or ''
840839
final_opt = ""
841840
for opt in cflags.split():
842841
if opt.startswith('-O'):
843842
final_opt = opt
844-
return final_opt not in ('', '-O0', '-Og')
843+
if sysconfig.get_config_var("CC") == "gcc":
844+
non_opts = ('', '-O0', '-Og')
845+
else:
846+
non_opts = ('', '-O0')
847+
return final_opt not in non_opts
845848

846849

847850
def check_cflags_pgo():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.