Bug 1456552 Make Optimized MinGW builds use -O# instead of falling through and collecting a -O r=ted
authorTom Ritter <tom@mozilla.com>
Wed, 16 May 2018 16:32:47 -0500
changeset 473461 87f1c846afc3eca37b82d8e86dd3fe451175ab21
parent 473460 a77d154666723ff2b43a362541cd63ebabb36f51
child 473462 8eaf4eadc303dc90177fb328c51f916543cce6c2
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1456552
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1456552 Make Optimized MinGW builds use -O# instead of falling through and collecting a -O r=ted We use -O2 for js (because we can) and we use -O1 for the root because there is an x86 compiler bug that is not immediately bypassable MozReview-Commit-ID: CnDk2ko3jfo
js/src/old-configure.in
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -649,16 +649,18 @@ case "$target" in
         # Use static libgcc and libstdc++
         LDFLAGS="$LDFLAGS -static"
         # Use temp file for windres (bug 213281)
         RCFLAGS='-O coff --use-temp-file'
         # mingw doesn't require kernel32, user32, and advapi32 explicitly
         LIBS="$LIBS -lgdi32 -lwinmm -lwsock32"
         MOZ_FIX_LINK_PATHS=
 
+        MOZ_OPTIMIZE_FLAGS="-O2"
+
         WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
         WIN32_GUI_EXE_LDFLAGS=-mwindows
     else
         TARGET_COMPILER_ABI=msvc
         HOST_CC='$(CC)'
         HOST_CXX='$(CXX)'
         if test "$AS_BIN"; then
             AS="$(basename "$AS_BIN")"
--- a/old-configure.in
+++ b/old-configure.in
@@ -857,16 +857,18 @@ case "$target" in
         # Use static libgcc and libstdc++
         LDFLAGS="$LDFLAGS -static"
         # Use temp file for windres (bug 213281)
         RCFLAGS='-O coff --use-temp-file'
         # mingw doesn't require kernel32, user32, and advapi32 explicitly
         LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
         MOZ_FIX_LINK_PATHS=
 
+        MOZ_OPTIMIZE_FLAGS="-O1"
+
         WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
         WIN32_GUI_EXE_LDFLAGS=-mwindows
 
         # GCC/binutils can't link to a function if we try to include dllexport function
         # in the same library as dllimport caller. To work around it, we build NSPR
         # and NSS with -mnop-fun-dllimport flag. The drawback of this solution is that
         # function thunks need to be generated for cross-DLL calls.
         MOZ_FOLD_LIBS_FLAGS="-mnop-fun-dllimport"