mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Don't fiddle with NDEBUG in C code (GH-16511)
* Don't fiddle with NDEBUG in C code It is way to late to do this in php.h, since assert.h has already been included. Even pushing that down to zend_portability.h may not have the desired effect. Instead we define or undefine NDEBUG as CFLAG, so that it works in all circumstances. As a last resort we fail at build time, if `NDEBUG` is defined when `ZEND_DEBUG` is enabled. We also remove the useless workaround in zend_test to include assert.h again, since that usually won't have any effect anyway. Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
This commit is contained in:
parent
361fb400ef
commit
836a162089
5 changed files with 10 additions and 14 deletions
|
@ -3429,7 +3429,7 @@ function toolset_setup_common_libs()
|
|||
function toolset_setup_build_mode()
|
||||
{
|
||||
if (PHP_DEBUG == "yes") {
|
||||
ADD_FLAG("CFLAGS", "/LDd /MDd /Od /D ZEND_DEBUG=1 " +
|
||||
ADD_FLAG("CFLAGS", "/LDd /MDd /Od /U NDebug /U NDEBUG /D ZEND_DEBUG=1 " +
|
||||
(TARGET_ARCH == 'x86'?"/ZI":"/Zi"));
|
||||
ADD_FLAG("LDFLAGS", "/debug");
|
||||
// Avoid problems when linking to release libraries that use the release
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue