Add support for generating PDB-format debug symbols with MSVC, by setting MOZ_DEBUG_SYMBOLS=1 in the environment. This is to be used in place of MOZ_PROFILE. Bug 244231, r=wtc, dmose.

This commit is contained in:
bryner%brianryner.com 2004-08-26 23:03:01 +00:00
parent c1681a238f
commit 70f2f266cb
2 changed files with 16 additions and 2 deletions

View File

@ -506,12 +506,21 @@ endif
splitsymbols:
ifdef MOZILLA_OFFICIAL
ifdef MOZ_DEBUG_SYMBOLS
echo finding pdb files
mkdir -p $(DIST)/$(BUILDID)
-cp `/bin/find . -path "./dist" -prune -o -name "*.dll" | sed "s/\.dll$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
-cp `/bin/find . -path "./dist" -prune -o -name "*.exe" | sed "s/\.exe$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
-cp `/bin/find . -path "./dist" -prune -o -name "*.EXE" | sed "s/\.EXE$$/\.pdb/" | xargs` $(DIST)/$(BUILDID)
endif # MOZ_DEBUG_SYMBOLS
ifdef MOZ_PROFILE
echo splitting symbols out of binaries
/bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
/bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
/bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
mkdir -p $(DIST)/$(BUILDID)
/bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
endif # MOZ_PROFILE
endif # MOZILLA_OFFICIAL
signnss:

View File

@ -307,9 +307,14 @@ else
# if MOZ_DEBUG is not set and MOZ_PROFILE is set, then we generate
# an optimized build with debugging symbols. Useful for debugging
# compiler optimization bugs, as well as running with Quantify.
ifdef MOZ_PROFILE
# MOZ_DEBUG_SYMBOLS works the same way as MOZ_PROFILE, but generates debug
# symbols in separate PDB files, rather than embedded into the binary.
ifneq (,$(MOZ_PROFILE)$(MOZ_DEBUG_SYMBOLS))
MOZ_OPTIMIZE_FLAGS=-Zi -O1 -UDEBUG -DNDEBUG
OS_LDFLAGS = /DEBUG /DEBUGTYPE:CV /PDB:NONE /OPT:REF /OPT:nowin98
OS_LDFLAGS = /DEBUG /OPT:REF /OPT:nowin98
ifdef MOZ_PROFILE
OS_LDFLAGS += /PDB:NONE
endif
WIN32_EXE_LDFLAGS=/FIXED:NO
endif