Thanks to visit codestin.com Credit goes to github.com
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 263d56e commit 129db32Copy full SHA for 129db32
1 file changed
Lib/test/support/__init__.py
@@ -835,15 +835,18 @@ def gc_threshold(*args):
835
finally:
836
gc.set_threshold(*old_threshold)
837
838
-
839
def python_is_optimized():
840
"""Find if Python was built with optimizations."""
841
cflags = sysconfig.get_config_var('PY_CFLAGS') or ''
842
final_opt = ""
843
for opt in cflags.split():
844
if opt.startswith('-O'):
845
final_opt = opt
846
- return final_opt not in ('', '-O0', '-Og')
+ if sysconfig.get_config_var("CC") == "gcc":
+ non_opts = ('', '-O0', '-Og')
847
+ else:
848
+ non_opts = ('', '-O0')
849
+ return final_opt not in non_opts
850
851
852
def check_cflags_pgo():
0 commit comments