diff options
author | Edin Kadribasic <edink@php.net> | 2005-02-25 00:20:19 +0000 |
---|---|---|
committer | Edin Kadribasic <edink@php.net> | 2005-02-25 00:20:19 +0000 |
commit | dec1c86ab6e9290094f741f41283113bfe54e756 (patch) | |
tree | 3e9ec6ebc994b364e140974694b21ca29d614433 /win32 | |
parent | a3085602d0a430b285c2e3a03d85765139ba7d14 (diff) | |
download | php-git-dec1c86ab6e9290094f741f41283113bfe54e756.tar.gz |
Added --enable-debug-pack which will create a zip file with *.pdb debug
symbol files. Could be used to allow windows users to use free Microsoft
debugging tools to generate useful backtraces.
Debug tools can be found at:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
CLAGS used described in:
http://support.microsoft.com/default.aspx?scid=kb;en-us;291585
Only tested on VC 6.0.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/build/Makefile | 4 | ||||
-rw-r--r-- | win32/build/config.w32 | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile index 2ce5499292..77ea3c3a02 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -107,6 +107,7 @@ build-dist: $(BUILD_DIR)\deplister.exe -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) @@ -115,6 +116,9 @@ build-dist: $(BUILD_DIR)\deplister.exe 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 diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 9c0ee80e7e..40980315b0 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -19,8 +19,11 @@ PATH_PROG('lemon'); 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 == '') { @@ -64,6 +67,11 @@ if (PHP_DEBUG == "yes") { // 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"); |