From f43748170d51d1ba21078110b9b31b43f08b3b6e Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Tue, 12 Oct 2004 00:09:58 +0000 Subject: [PATCH] Add an explicit --enable-quantify option for windows that causes /FIXED:NO to be used when linking the executable. Otherwise, we omit that option and save about 6% on executable size (the change only affects builds with MOZ_PROFILE or MOZ_DEBUG_SYMBOLS). Bug 263680, r=bsmedberg. --- config/autoconf.mk.in | 2 ++ config/config.mk | 5 +++++ configure.in | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 544f86f492eb..81ac064c3733 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -475,6 +475,8 @@ MOZ_PROFILE = @MOZ_PROFILE@ MOZ_COVERAGE = @MOZ_COVERAGE@ MOZ_BROWSE_INFO = @MOZ_BROWSE_INFO@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@ +MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@ +MOZ_QUANTIFY = @MOZ_QUANTIFY@ # Codesighs tools option, enables win32 mapfiles. MOZ_MAPINFO = @MOZ_MAPINFO@ diff --git a/config/config.mk b/config/config.mk index c0b4c5d9d1ae..7591841f6da7 100644 --- a/config/config.mk +++ b/config/config.mk @@ -315,6 +315,11 @@ OS_LDFLAGS = /DEBUG /OPT:REF /OPT:nowin98 ifdef MOZ_PROFILE OS_LDFLAGS += /PDB:NONE endif +endif + +# /FIXED:NO is needed for Quantify to work, but it increases the size +# of executables, so only use it if building for Quantify. +ifdef MOZ_QUANTIFY WIN32_EXE_LDFLAGS=/FIXED:NO endif diff --git a/configure.in b/configure.in index 4b491eccf1ad..84c91e1863ee 100644 --- a/configure.in +++ b/configure.in @@ -4850,6 +4850,14 @@ MOZ_ARG_WITH_STRING(insure-exclude-dirs, Dirs to not instrument with insure ], MOZ_INSURE_EXCLUDE_DIRS="config $withval" ) +dnl ======================================================== +dnl = Support for Quantify (Windows) +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(quantify, +[ --enable-quantify Enable Quantify support (Windows only) ], + MOZ_QUANTIFY=1, + MOZ_QUANTIFY= ) + dnl ======================================================== dnl = Support for demangling undefined symbols dnl ======================================================== @@ -5720,6 +5728,7 @@ AC_SUBST(MOZ_USE_NATIVE_UCONV) AC_SUBST(MOZ_INSURE) AC_SUBST(MOZ_INSURE_DIRS) AC_SUBST(MOZ_INSURE_EXCLUDE_DIRS) +AC_SUBST(MOZ_QUANTIFY) AC_SUBST(MOZ_INSURIFYING) AC_SUBST(MOZ_LDAP_XPCOM) AC_SUBST(MOZ_LDAP_XPCOM_EXPERIMENTAL) @@ -5784,6 +5793,7 @@ AC_SUBST(MOZ_APP_VERSION) dnl win32 options AC_SUBST(MOZ_PROFILE) +AC_SUBST(MOZ_DEBUG_SYMBOLS) AC_SUBST(MOZ_COVERAGE) AC_SUBST(MOZ_MAPINFO) AC_SUBST(MOZ_BROWSE_INFO)