Bug 1341504 - Don't disable incremental linking when optimizations are turned off. r?ted draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 02 Sep 2017 03:03:08 +0200
changeset 660423 cb753e1f189b2fd1f725bc1c9fe127ca62d0a9d8
parent 660422 d8e238b811d3dc74515065ae8cab6c74baf0295f
child 660631 b711eead45a72d324cb08b4d99d876396646d483
push id78397
push userbmo:jyavenard@mozilla.com
push dateWed, 06 Sep 2017 23:35:18 +0000
reviewersted
bugs1341504
milestone57.0a1
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
config/config.mk
--- 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