From fdb92da75c0fa94cb6439423e0415839f110a252 Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 2 Dec 2021 04:56:36 -0800 Subject: [PATCH 1/2] Enable assertions in Emscripten debug builds --- configure | 6 ++++++ configure.ac | 6 ++++++ 2 files changed, 12 insertions(+) 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 ;; From c5bfe42e76f5db9463e422132a09540805f934d1 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 13:17:59 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Misc/NEWS.d/next/Build/2021-12-02-13-17-57.bpo-40280.H4YNr5.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Build/2021-12-02-13-17-57.bpo-40280.H4YNr5.rst 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