summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-01-16 13:58:28 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-01-16 13:58:28 +0100
commit1e62e627fd6149d1f5ea7815b155f3dcb59c9476 (patch)
treea58f7d100071e64115a821b39711fdbb3d34b06e
parentc3cf01b553b1a358531d0fa56e3caba51f9a3e33 (diff)
parentc9908ee5ebacd00108b960d03e9c7e1cb299b27b (diff)
downloadphp-git-1e62e627fd6149d1f5ea7815b155f3dcb59c9476.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Disable optimizations for ASan instrumented builds
-rw-r--r--Zend/zend_portability.h2
-rw-r--r--win32/build/confutils.js9
2 files changed, 8 insertions, 3 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 9bb95f7070..c561e0fdf2 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -289,7 +289,7 @@ char *alloca();
(_default)
#endif
-#if ZEND_DEBUG
+#if ZEND_DEBUG || defined(ZEND_WIN32_NEVER_INLINE)
# define zend_always_inline inline
# define zend_never_inline
#else
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 560ce8a978..86d7f94c51 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -3411,8 +3411,13 @@ function toolset_setup_build_mode()
ADD_FLAG("CFLAGS", "/Zi");
ADD_FLAG("LDFLAGS", "/incremental:no /debug /opt:ref,icf");
}
- // Equivalent to Release_TSInline build -> best optimization
- ADD_FLAG("CFLAGS", "/LD /MD /W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0");
+ ADD_FLAG("CFLAGS", "/LD /MD /W3");
+ if (PHP_SANITIZER == "yes" && CLANG_TOOLSET) {
+ ADD_FLAG("CFLAGS", "/Od /D NDebug /D NDEBUG /D ZEND_WIN32_NEVER_INLINE /D ZEND_DEBUG=0");
+ } else {
+ // Equivalent to Release_TSInline build -> best optimization
+ ADD_FLAG("CFLAGS", "/Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0");
+ }
// if you have VS.Net /GS hardens the binary against buffer overruns
// ADD_FLAG("CFLAGS", "/GS");