gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (GH-124078)
Tracing references is not currently thread-safe in the free-threaded build.
(cherry picked from commit
3b45df03a4bd0e21edec43144b8d9bac689d23a0)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
--- /dev/null
+Building using :option:`--with-trace-refs` is (temporarily) disallowed when the
+GIL is disabled.
fi
+if test "$disable_gil" = "yes" -a "$with_trace_refs" = "yes";
+then
+ as_fn_error $? "--disable-gil cannot be used with --with-trace-refs" "$LINENO" 5
+fi
# Check for --enable-pystats
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-pystats" >&5
[Define if you want to enable tracing references for debugging purpose])
fi
+if test "$disable_gil" = "yes" -a "$with_trace_refs" = "yes";
+then
+ AC_MSG_ERROR([--disable-gil cannot be used with --with-trace-refs])
+fi
# Check for --enable-pystats
AC_MSG_CHECKING([for --enable-pystats])