From e801fbc9c181719ac85d6d9b4686d83180124509 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 8 Feb 2021 21:49:37 +0000 Subject: [PATCH 1/2] Disable ceval.c optimisations for Windows debug builds. This ensures that ceval.c can be debugged. --- Include/pyport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/pyport.h b/Include/pyport.h index 6687849d844724..fb9d03e7fb3ec2 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -180,7 +180,7 @@ typedef int Py_ssize_clean_t; */ #if defined(_MSC_VER) -# if defined(PY_LOCAL_AGGRESSIVE) +# if defined(PY_LOCAL_AGGRESSIVE) && !defined(Py_DEBUG) /* enable more aggressive optimization for visual studio */ # pragma optimize("agtw", on) #endif From 9f4fdad2e07511774ac622d46d896d9e10711b85 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 9 Feb 2021 00:38:00 +0000 Subject: [PATCH 2/2] Remove irrelevant options --- Include/pyport.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/pyport.h b/Include/pyport.h index fb9d03e7fb3ec2..46bbef22d73968 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -181,8 +181,8 @@ typedef int Py_ssize_clean_t; #if defined(_MSC_VER) # if defined(PY_LOCAL_AGGRESSIVE) && !defined(Py_DEBUG) - /* enable more aggressive optimization for visual studio */ -# pragma optimize("agtw", on) + /* 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)