Bug 1268617 - Pass -g to rustc on debug builds. r?ted draft
authorRalph Giles <giles@mozilla.com>
Thu, 28 Apr 2016 11:56:02 -0700
changeset 357433 6bb67784507d40a6d1e0d595ee6699b65eb4edb9
parent 357432 6adc822f5e27a55551faeb6c47a9bd8b0859a23b
child 519645 c2cb150d0f69a1e526e66b33592c727b601586e5
push id16782
push userbmo:giles@thaumas.net
push dateThu, 28 Apr 2016 19:02:38 +0000
reviewersted
bugs1268617
milestone49.0a1
Bug 1268617 - Pass -g to rustc on debug builds. r?ted Enable debug output from the rust compiler when we're doing so for the C/C++ compilers. MozReview-Commit-ID: K0iqlPZ1Thu
config/config.mk
--- a/config/config.mk
+++ b/config/config.mk
@@ -131,37 +131,40 @@ SLEEP ?= sleep
 TOUCH ?= touch
 
 PYTHON_PATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py
 
 # determine debug-related options
 _DEBUG_ASFLAGS :=
 _DEBUG_CFLAGS :=
 _DEBUG_LDFLAGS :=
+_DEBUG_RUSTFLAGS :=
 
 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)
+  _DEBUG_RUSTFLAGS += -g
 endif
 
 ASFLAGS += $(_DEBUG_ASFLAGS)
 OS_CFLAGS += $(_DEBUG_CFLAGS)
 OS_CXXFLAGS += $(_DEBUG_CFLAGS)
 OS_LDFLAGS += $(_DEBUG_LDFLAGS)
+RUSTFLAGS += $(_DEBUG_RUSTFLAGS)
 
 # XXX: What does this? Bug 482434 filed for better explanation.
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 ifndef MOZ_DEBUG
 
 # MOZ_DEBUG_SYMBOLS generates debug symbols in separate PDB files.
 # Used for generating an optimized build with debugging symbols.
 # Used in the Windows nightlies to generate symbols for crash reporting.