#==================================================================================================
#
# Patch to change the behavior of warning promotion, which is presently enabled for all types of
# debug builds. That includes 'debugoptimized', which one might argue isn't a developer build.
# 
# So, we tweak upstream's logic slightly, only enabling maximum strictness for a pure-debug
# build.
#
# This allows us to avoid having to selectively disable one or more specific warning options,
# since they're no longer promoted to error (via '-Werror=xxx').
#
# Ultimately I plan to collaborate with upstream, to see if they'd be willing to accept this.
# (Either verbatim, or via a slightly different approach.)
#
# Author: Christopher Nielsen
# Date:   2023-08-21
#
#==================================================================================================
--- meson.build.orig	2023-08-21 19:09:21.000000000 -0400
+++ meson.build	2023-08-21 19:14:10.000000000 -0400
@@ -317,7 +317,7 @@
     'write-strings',
   ]
 
-  if get_option('buildtype').startswith('debug')
+  if get_option('buildtype') == 'debug'
     foreach warning: extra_warnings
       test_cflags += '-Werror=@0@'.format(warning)
     endforeach
