summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/patches/01-pyconfig.patch
blob: 9681cbc6b81d47fca5f6e60ad574fecdc43c4235 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- contrib/tools/python3/Include/pyconfig.h	(index)
+++ contrib/tools/python3/Include/pyconfig.h	(working tree)
@@ -12,3 +12,21 @@
 #if defined(_musl_)
 #   include "pyconfig-musl.h"
 #endif
+
+#undef Py_DEBUG
+
+/* Define if you want to build an interpreter with many run-time checks. */
+#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
+#define Py_DEBUG
+#define GC_NDEBUG
+#endif
+
+#ifdef Py_DEBUG
+#define ABIFLAGS "d"
+#else
+#define ABIFLAGS ""
+#endif
+
+#ifdef address_sanitizer_enabled
+#undef WITH_PYMALLOC
+#endif