Skip to content

Commit 1e62e62

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Disable optimizations for ASan instrumented builds
2 parents c3cf01b + c9908ee commit 1e62e62

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Zend/zend_portability.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ char *alloca();
289289
(_default)
290290
#endif
291291

292-
#if ZEND_DEBUG
292+
#if ZEND_DEBUG || defined(ZEND_WIN32_NEVER_INLINE)
293293
# define zend_always_inline inline
294294
# define zend_never_inline
295295
#else

win32/build/confutils.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,8 +3411,13 @@ function toolset_setup_build_mode()
34113411
ADD_FLAG("CFLAGS", "/Zi");
34123412
ADD_FLAG("LDFLAGS", "/incremental:no /debug /opt:ref,icf");
34133413
}
3414-
// Equivalent to Release_TSInline build -> best optimization
3415-
ADD_FLAG("CFLAGS", "/LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0");
3414+
ADD_FLAG("CFLAGS", "/LD /MD /W3");
3415+
if (PHP_SANITIZER == "yes" && CLANG_TOOLSET) {
3416+
ADD_FLAG("CFLAGS", "/Od /D NDebug /D NDEBUG /D ZEND_WIN32_NEVER_INLINE /D ZEND_DEBUG=0");
3417+
} else {
3418+
// Equivalent to Release_TSInline build -> best optimization
3419+
ADD_FLAG("CFLAGS", "/Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0");
3420+
}
34163421

34173422
// if you have VS.Net /GS hardens the binary against buffer overruns
34183423
// ADD_FLAG("CFLAGS", "/GS");

0 commit comments

Comments
 (0)