Bug 715849 - yasm and GNU as should add debug flag if MOZ_DEBUG_SYMBOLS=1. r=khuey

This commit is contained in:
Makoto Kato 2012-02-07 15:06:28 +09:00
parent b376fcf426
commit 169c5d75e1
2 changed files with 40 additions and 24 deletions

View File

@ -163,24 +163,37 @@ PYTHON_PATH = %pythonpath main
endif
# determine debug-related options
_DEBUG_ASFLAGS :=
_DEBUG_CFLAGS :=
_DEBUG_LDFLAGS :=
ifdef MOZ_DEBUG
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
else
_DEBUG_CFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
ifdef MOZ_DEBUG_SYMBOLS
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
ifneq (,$(MOZ_DEBUG)$(MOZ_DEBUG_SYMBOLS))
ifeq ($(AS),yasm)
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
_DEBUG_ASFLAGS += -g cv8
else
ifneq ($(OS_ARCH),Darwin)
_DEBUG_ASFLAGS += -g dwarf2
endif
endif
else
_DEBUG_ASFLAGS += $(MOZ_DEBUG_FLAGS)
endif
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
MOZALLOC_LIB = $(call EXPAND_LIBNAME_PATH,mozalloc,$(DIST)/lib)
ASFLAGS += $(_DEBUG_ASFLAGS)
OS_CFLAGS += $(_DEBUG_CFLAGS)
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
OS_LDFLAGS += $(_DEBUG_LDFLAGS)
@ -198,13 +211,8 @@ else # ! MOZ_DEBUG
# Used for generating an optimized build with debugging symbols.
# Used in the Windows nightlies to generate symbols for crash reporting.
ifdef MOZ_DEBUG_SYMBOLS
ifeq ($(AS),yasm)
ASFLAGS += -g cv8
else
ASFLAGS += -Zi
endif
OS_CXXFLAGS += -Zi -UDEBUG -DNDEBUG
OS_CFLAGS += -Zi -UDEBUG -DNDEBUG
OS_CXXFLAGS += -UDEBUG -DNDEBUG
OS_CFLAGS += -UDEBUG -DNDEBUG
ifdef HAVE_64BIT_OS
OS_LDFLAGS += -DEBUG -OPT:REF,ICF
else

View File

@ -163,24 +163,37 @@ PYTHON_PATH = %pythonpath main
endif
# determine debug-related options
_DEBUG_ASFLAGS :=
_DEBUG_CFLAGS :=
_DEBUG_LDFLAGS :=
ifdef MOZ_DEBUG
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
else
_DEBUG_CFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
ifdef MOZ_DEBUG_SYMBOLS
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
ifneq (,$(MOZ_DEBUG)$(MOZ_DEBUG_SYMBOLS))
ifeq ($(AS),yasm)
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
_DEBUG_ASFLAGS += -g cv8
else
ifneq ($(OS_ARCH),Darwin)
_DEBUG_ASFLAGS += -g dwarf2
endif
endif
else
_DEBUG_ASFLAGS += $(MOZ_DEBUG_FLAGS)
endif
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
MOZALLOC_LIB = $(call EXPAND_LIBNAME_PATH,mozalloc,$(DIST)/lib)
ASFLAGS += $(_DEBUG_ASFLAGS)
OS_CFLAGS += $(_DEBUG_CFLAGS)
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
OS_LDFLAGS += $(_DEBUG_LDFLAGS)
@ -198,13 +211,8 @@ else # ! MOZ_DEBUG
# Used for generating an optimized build with debugging symbols.
# Used in the Windows nightlies to generate symbols for crash reporting.
ifdef MOZ_DEBUG_SYMBOLS
ifeq ($(AS),yasm)
ASFLAGS += -g cv8
else
ASFLAGS += -Zi
endif
OS_CXXFLAGS += -Zi -UDEBUG -DNDEBUG
OS_CFLAGS += -Zi -UDEBUG -DNDEBUG
OS_CXXFLAGS += -UDEBUG -DNDEBUG
OS_CFLAGS += -UDEBUG -DNDEBUG
ifdef HAVE_64BIT_OS
OS_LDFLAGS += -DEBUG -OPT:REF,ICF
else