Bug 883339: Enable GTest on Windows except for PGO builds, r=glandium
☠☠ backed out by 5a8e5ad43d90 ☠ ☠
authorBrian Smith <brian@briansmith.org>
Sun, 08 Jun 2014 19:00:58 -0700
changeset 211176 3a5789d0e7e010b951a92d3809ca26b2e6540ec4
parent 211175 7591c7fdee63ec7a47e5b302af791c2ca0136d4e
child 211177 080476fd705927fdc1d68a7d790ee510dc4dd0f8
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs883339
milestone33.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 883339: Enable GTest on Windows except for PGO builds, r=glandium
client.mk
configure.in
testing/gtest/Makefile.in
--- a/client.mk
+++ b/client.mk
@@ -124,16 +124,17 @@ export FOUND_MOZCONFIG
 MOZCONFIG_OUT_LINES := $(subst $(CR), ,$(subst $(NULL) $(NULL),||,$(MOZCONFIG_CONTENT)))
 # Filter-out comments from those lines.
 START_COMMENT = \#
 MOZCONFIG_OUT_FILTERED := $(filter-out $(START_COMMENT)%,$(MOZCONFIG_OUT_LINES))
 
 ifdef AUTOCLOBBER
 export AUTOCLOBBER=1
 endif
+export MOZ_PGO
 
 ifdef MOZ_PARALLEL_BUILD
   MOZ_MAKE_FLAGS := $(filter-out -j%,$(MOZ_MAKE_FLAGS))
   MOZ_MAKE_FLAGS += -j$(MOZ_PARALLEL_BUILD)
 endif
 
 # Automatically add -jN to make flags if not defined. N defaults to number of cores.
 ifeq (,$(findstring -j,$(MOZ_MAKE_FLAGS)))
--- a/configure.in
+++ b/configure.in
@@ -6792,16 +6792,17 @@ fi
 fi # COMPILE_ENVIRONMENT
 
 AC_SUBST(MOZ_OPTIMIZE)
 AC_SUBST(MOZ_FRAMEPTR_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
 AC_SUBST(MOZ_ALLOW_HEAP_EXECUTE_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
+AC_SUBST(MOZ_PGO)
 AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS)
 
 dnl ========================================================
 dnl = Enable any treating of compile warnings as errors
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(warnings-as-errors,
 [  --enable-warnings-as-errors
                           Enable treating of warnings as errors],
--- a/testing/gtest/Makefile.in
+++ b/testing/gtest/Makefile.in
@@ -2,29 +2,34 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Avoid recursive make to avoid having to add files to the gtest/ subdirectory
 # (which is third-party code), and to make the build faster.
 
 include $(topsrcdir)/config/rules.mk
 
+# Bug 1028035: Linking xul-gtest.dll takes too long, so we disable GTest on
+# Windows PGO builds.
+ifeq (1WINNT,$(MOZ_PGO)$(OS_ARCH))
+SKIP_GTEST_DURING_MAKE_CHECK ?= 1
+endif
+
 ifeq (browser,$(MOZ_BUILD_APP))
-# Disable because of metro linking error bug 883339:
-# LNK1181: cannot open input file 'runtimeobject.lib'
-# And non metro linking error bug 886656:
-# LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
-ifneq ($(OS_ARCH),WINNT)
 ifdef COMPILE_ENVIRONMENT
 gtest::
 	$(MAKE) -C $(DEPTH)/toolkit/library gtestxul
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	$(MAKE) -C $(DEPTH)/browser/app repackage
 endif
+ifneq (1,$(SKIP_GTEST_DURING_MAKE_CHECK))
 check::
 	$(MAKE) -C $(DEPTH)/toolkit/library gtestxul
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	$(MAKE) -C $(DEPTH)/browser/app repackage
 endif
 	$(PYTHON) $(topsrcdir)/testing/gtest/rungtests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX)
+else
+check::
+	echo GTest skipped during make check
 endif
 endif
 endif