-rmdir /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
-rmdir /s /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
-del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip
+ -del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)-Win32.zip
-del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip
$(BUILD_DIR)\php.exe -n win32/build/mkdist.php "$(BUILD_DIR)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS)" "$(PECL_TARGETS)" "$(SNAPSHOT_TEMPLATE)"
cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
cd $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
-$(ZIP) -9 -r ..\pecl-$(PHP_VERSION_STRING)-Win32.zip .
cd ..\..
+ cd $(BUILD_DIR)
+ -$(ZIP) -9 php-debug-pack-$(PHP_VERSION_STRING)-Win32.zip *.pdb
+ cd ..\..
dist: all build-dist
snap: build-snap build-dist
PATH_PROG('mc', WshShell.Environment("Process").Item("PATH"));
ARG_ENABLE('debug', 'Compile with debugging symbols', "no");
+ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');
+if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") {
+ ERROR("Use of both --enable-debug and --enable-debug-pack not allowed.");
+}
ARG_ENABLE('zts', 'Thread safety', 'yes');
-
// Configures the hard-coded installation dir
ARG_ENABLE('prefix', 'where PHP will be installed', '');
if (PHP_PREFIX == '') {
// version of the libc
ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:msvcrt");
} else {
+ // Generate external debug files when --enable-debug-pack is specified
+ if (PHP_DEBUG_PACK == "yes") {
+ 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 /GB /GF /D ZEND_DEBUG=0");