]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485)
authorSteve Dower <steve.dower@python.org>
Tue, 9 Feb 2021 18:13:36 +0000 (18:13 +0000)
committerGitHub <noreply@github.com>
Tue, 9 Feb 2021 18:13:36 +0000 (18:13 +0000)
This ensures that ceval.c can be debugged.
Also remove some irrelevant options from the pragma.

Include/pyport.h

index 6687849d8447243c2f997a780ba288c819afabb3..46bbef22d7396879d4a31a4dee5122e3dbbdf150 100644 (file)
@@ -180,9 +180,9 @@ typedef int Py_ssize_clean_t;
  */
 
 #if defined(_MSC_VER)
-#  if defined(PY_LOCAL_AGGRESSIVE)
-   /* enable more aggressive optimization for visual studio */
-#  pragma optimize("agtw", on)
+#  if defined(PY_LOCAL_AGGRESSIVE) && !defined(Py_DEBUG)
+   /* enable more aggressive optimization for MSVC */
+#  pragma optimize("gt", on)
 #endif
    /* ignore warnings if the compiler decides not to inline a function */
 #  pragma warning(disable: 4710)