We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ab7e11 commit 43a2a37Copy full SHA for 43a2a37
Lib/test/support/__init__.py
@@ -833,15 +833,18 @@ def gc_threshold(*args):
833
finally:
834
gc.set_threshold(*old_threshold)
835
836
-
837
def python_is_optimized():
838
"""Find if Python was built with optimizations."""
839
cflags = sysconfig.get_config_var('PY_CFLAGS') or ''
840
final_opt = ""
841
for opt in cflags.split():
842
if opt.startswith('-O'):
843
final_opt = opt
844
- return final_opt not in ('', '-O0', '-Og')
+ if sysconfig.get_config_var("CC") == "gcc":
+ non_opts = ('', '-O0', '-Og')
845
+ else:
846
+ non_opts = ('', '-O0')
847
+ return final_opt not in non_opts
848
849
850
def check_cflags_pgo():
0 commit comments