summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-25 00:56:28 +0200
committerGitHub <noreply@github.com>2019-04-25 00:56:28 +0200
commitf4e4703e746067d6630410408d414b11003334d6 (patch)
treece2b2d0476b42da4c287dd686dbe499c93d92c33 /configure.ac
parent888f37bc2826d9ab2cbec6f153e7f58a34785c4a (diff)
downloadcpython-git-f4e4703e746067d6630410408d414b11003334d6.tar.gz
bpo-36465: Make release and debug ABI compatible (GH-12615)
Release build and debug build are now ABI compatible: the Py_DEBUG define no longer implies Py_TRACE_REFS define which introduces the only ABI incompatibility. A new "./configure --with-trace-refs" build option is now required to get Py_TRACE_REFS define which adds sys.getobjects() function and PYTHONDUMPREFS environment variable. Changes: * Add ./configure --with-trace-refs * Py_DEBUG no longer implies Py_TRACE_REFS
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3f378c9734..65d3f8e691 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1228,8 +1228,21 @@ else AC_MSG_RESULT(no); Py_DEBUG='false'
fi],
[AC_MSG_RESULT(no)])
-# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
-# the ABI. This allows enabling assertions without changing the ABI.
+# Check for --with-trace-refs
+# --with-trace-refs
+AC_MSG_CHECKING(for --with-trace-refs)
+AC_ARG_WITH(trace-refs,
+ AS_HELP_STRING([--with-trace-refs],[enable tracing references for debugging purpose]),,
+ with_trace_refs=no)
+AC_MSG_RESULT($with_trace_refs)
+
+if test "$with_trace_refs" = "yes"
+then
+ AC_DEFINE(Py_TRACE_REFS, 1, [Define if you want to enable tracing references for debugging purpose])
+fi
+
+# Check for --with-assertions.
+# This allows enabling assertions without Py_DEBUG.
assertions='false'
AC_MSG_CHECKING(for --with-assertions)
AC_ARG_WITH(assertions,