Bug 883339: Enable "mach gtest" on Windows, but leave GTest disabled for "make check", r=glandium
authorBrian Smith <brian@briansmith.org>
Sun, 08 Jun 2014 19:00:58 -0700
changeset 190631 a2dce0704b697546acd689d1f79f0cea929e2f7a
parent 190630 24fb014f1ae3d7372a8777d1b2a5e8dcd9cf3cad
child 190632 4f21e9bc729ae7de280391690af0e5fe77efe912
push id27011
push usercbook@mozilla.com
push dateWed, 25 Jun 2014 13:30:09 +0000
treeherdermozilla-central@645ad2c24114 [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 "mach gtest" on Windows, but leave GTest disabled for "make check", 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
@@ -6793,16 +6793,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,36 @@
 # 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.
+# Bug 1029469: fix_stack_using_bpsyms.py doesn't know how to deal with the
+# second xul.pdb file that linking xul-gtest.dll creates.
+ifeq (WINNT,$(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