Bug 883339 - Enable gtest on windows TBPL non-PGO builds. r=ted, a=test-only
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 26 Jun 2014 07:59:24 +0900
changeset 208554 22a27415829000b342392001e4d9015c6bab5f19
parent 208553 4e32c33cfb9083b25225c2be9c498f4fee68b5e4
child 208555 78ba74153e22eafc962307059f76241757652c1f
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, test-only
bugs883339
milestone32.0a2
Bug 883339 - Enable gtest on windows TBPL non-PGO builds. r=ted, a=test-only
config/rules.mk
testing/gtest/Makefile.in
toolkit/library/gtest/Makefile.in
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -233,17 +233,17 @@ ifndef GNU_CC
 ifdef SIMPLE_PROGRAMS
 COMPILE_PDB_FLAG ?= -Fd$(basename $(@F)).pdb
 else
 COMPILE_PDB_FLAG ?= -Fdgenerated.pdb
 endif
 COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
 COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
 
-LINK_PDBFILE = $(basename $(@F)).pdb
+LINK_PDBFILE ?= $(basename $(@F)).pdb
 ifdef MOZ_DEBUG
 CODFILE=$(basename $(@F)).cod
 endif
 
 ifdef DEFFILE
 OS_LDFLAGS += -DEF:$(call normalizepath,$(DEFFILE))
 EXTRA_DEPS += $(DEFFILE)
 endif
--- a/testing/gtest/Makefile.in
+++ b/testing/gtest/Makefile.in
@@ -4,19 +4,17 @@
 
 # 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))
+ifeq (1_WINNT,$(MOZ_PGO)_$(OS_ARCH))
 SKIP_GTEST_DURING_MAKE_CHECK ?= 1
 endif
 
 ifeq (browser,$(MOZ_BUILD_APP))
 ifdef COMPILE_ENVIRONMENT
 gtest::
 	$(MAKE) -C $(DEPTH)/toolkit/library gtestxul
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
--- a/toolkit/library/gtest/Makefile.in
+++ b/toolkit/library/gtest/Makefile.in
@@ -19,9 +19,11 @@ include $(topsrcdir)/toolkit/library/lib
 
 ifdef COMPILE_ENVIRONMENT
 libs:: $(DIST)/bin/dependentlibs.list.gtest
 endif
 
 $(DIST)/bin/dependentlibs.list.gtest: $(DIST)/bin/dependentlibs.list
 	sed -e 's|$(SHARED_LIBRARY)|gtest/$(SHARED_LIBRARY)|' $< > $@
 
+LINK_PDBFILE = xul-gtest.pdb
+
 endif