Bug 1341504 - Don't disable incremental linking when optimizations are turned off. r?ted
Incremental linking is automatically disabled when -OPT:REF or -OPT:ICF are used.
Seeing that we're disabling optimizations anyway, may as well not use those linker flags as they considerably slow down linking.
MozReview-Commit-ID: 9OXG19uxeI9
--- a/config/config.mk
+++ b/config/config.mk
@@ -161,34 +161,30 @@ OS_LDFLAGS += $(_DEBUG_LDFLAGS)
# 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.
ifdef MOZ_DEBUG_SYMBOLS
-ifdef HAVE_64BIT_BUILD
-OS_LDFLAGS += -DEBUG -OPT:REF,ICF
-else
-OS_LDFLAGS += -DEBUG -OPT:REF
-endif
+OS_LDFLAGS += -DEBUG
endif
#
# Handle DMD in optimized builds.
#
ifdef MOZ_DMD
-ifdef HAVE_64BIT_BUILD
-OS_LDFLAGS = -DEBUG -OPT:REF,ICF
-else
-OS_LDFLAGS = -DEBUG -OPT:REF
-endif
+OS_LDFLAGS = -DEBUG
endif # MOZ_DMD
+ifdef MOZ_OPTIMIZE
+OS_LDFLAGS += -OPT:REF,ICF
+endif # MOZ_OPTIMIZE
+
endif # MOZ_DEBUG
endif # WINNT && !GNU_CC
#
# Build using PIC by default
#
_ENABLE_PIC=1