Skip to content

Commit cff606e

Browse files
committed
debug: windows build changes for debugging
1 parent 854c37d commit cff606e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

win32/build/confutils.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,30 +3421,30 @@ function toolset_setup_common_libs()
34213421

34223422
function toolset_setup_build_mode()
34233423
{
3424-
if (PHP_DEBUG == "yes") {
3424+
/*if (PHP_DEBUG == "yes") */{
34253425
ADD_FLAG("CFLAGS", "/LDd /MDd /Od /D _DEBUG /D ZEND_DEBUG=1 " +
34263426
(X64?"/Zi":"/ZI"));
34273427
ADD_FLAG("LDFLAGS", "/debug");
34283428
// Avoid problems when linking to release libraries that use the release
34293429
// version of the libc
34303430
ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:msvcrt");
3431-
} else {
3432-
// Generate external debug files when --enable-debug-pack is specified
3433-
if (PHP_DEBUG_PACK == "yes") {
3434-
ADD_FLAG("CFLAGS", "/Zi");
3435-
ADD_FLAG("LDFLAGS", "/incremental:no /debug /opt:ref,icf");
3436-
}
3437-
ADD_FLAG("CFLAGS", "/LD /MD");
3438-
if (PHP_SANITIZER == "yes" && CLANG_TOOLSET) {
3439-
ADD_FLAG("CFLAGS", "/Od /D _DEBUG /D ZEND_WIN32_NEVER_INLINE /D ZEND_DEBUG=1");
3440-
} else {
3441-
// Equivalent to Release_TSInline build -> best optimization
3442-
ADD_FLAG("CFLAGS", "/Ox /D _DEBUG /GF /D ZEND_DEBUG=1");
3443-
}
3444-
3445-
// if you have VS.Net /GS hardens the binary against buffer overruns
3446-
// ADD_FLAG("CFLAGS", "/GS");
3447-
}
3431+
//} else {
3432+
// // Generate external debug files when --enable-debug-pack is specified
3433+
// if (PHP_DEBUG_PACK == "yes") {
3434+
// ADD_FLAG("CFLAGS", "/Zi");
3435+
// ADD_FLAG("LDFLAGS", "/incremental:no /debug /opt:ref,icf");
3436+
// }
3437+
// ADD_FLAG("CFLAGS", "/LD /MD");
3438+
// if (PHP_SANITIZER == "yes" && CLANG_TOOLSET) {
3439+
// ADD_FLAG("CFLAGS", "/Od /D _DEBUG /D ZEND_WIN32_NEVER_INLINE /D ZEND_DEBUG=1");
3440+
// } else {
3441+
// // Equivalent to Release_TSInline build -> best optimization
3442+
// ADD_FLAG("CFLAGS", "/Ox /D _DEBUG /GF /D ZEND_DEBUG=1");
3443+
// }
3444+
//
3445+
// // if you have VS.Net /GS hardens the binary against buffer overruns
3446+
// // ADD_FLAG("CFLAGS", "/GS");
3447+
//}
34483448
}
34493449

34503450
function object_out_dir_option_handle()

0 commit comments

Comments
 (0)