]> granicus.if.org Git - python/commitdiff
Issue #23445: Fix test.support.python_is_optimized() for CFLAGS=-Og
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 27 Mar 2015 14:36:01 +0000 (15:36 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 27 Mar 2015 14:36:01 +0000 (15:36 +0100)
-Og does not optimize the C code, it's just "fast debugging".

Lib/test/support/__init__.py

index 94a5858a1dbcdb47ab5b4d2510497be3c4bc25bc..10c48b4b7ef60fed6fe9c952b71921bbc99b2c5a 100644 (file)
@@ -1438,7 +1438,7 @@ def python_is_optimized():
     for opt in cflags.split():
         if opt.startswith('-O'):
             final_opt = opt
-    return final_opt != '' and final_opt != '-O0'
+    return final_opt not in ('', '-O0', '-Og')
 
 
 _header = 'nP'