diff --git a/Misc/NEWS.d/next/Build/2021-12-02-13-17-57.bpo-40280.H4YNr5.rst b/Misc/NEWS.d/next/Build/2021-12-02-13-17-57.bpo-40280.H4YNr5.rst new file mode 100644 index 00000000000000..70e75ada4a4220 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-12-02-13-17-57.bpo-40280.H4YNr5.rst @@ -0,0 +1 @@ +Emscripten now builds with assertions enabled in debug builds. \ No newline at end of file diff --git a/configure b/configure index 0aceffb35065a0..17852ab1653a2b 100755 --- a/configure +++ b/configure @@ -7521,6 +7521,12 @@ then case $ac_sys_system in SCO_SV*) OPT="$OPT -m486 -DSCO5" ;; + Emscripten) + if test "$Py_DEBUG" = 'true' ; then + # Compile with assertions in debug mode + OPT="$OPT -s ASSERTIONS=1" + fi + ;; esac ;; diff --git a/configure.ac b/configure.ac index 99fa94d1029099..7d3a321603c2f2 100644 --- a/configure.ac +++ b/configure.ac @@ -1734,6 +1734,12 @@ then case $ac_sys_system in SCO_SV*) OPT="$OPT -m486 -DSCO5" ;; + Emscripten) + if test "$Py_DEBUG" = 'true' ; then + # Compile with assertions in debug mode + OPT="$OPT -s ASSERTIONS=1" + fi + ;; esac ;;