From: Steve Dower Date: Tue, 9 Feb 2021 18:13:36 +0000 (+0000) Subject: bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485) X-Git-Tag: v3.10.0a6~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b74396c3167cc780f01309148db02709bc37b432;p=thirdparty%2FPython%2Fcpython.git bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485) This ensures that ceval.c can be debugged. Also remove some irrelevant options from the pragma. --- diff --git a/Include/pyport.h b/Include/pyport.h index 6687849d8447..46bbef22d739 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -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)