Bug 785102 - Two different libxul.so used while populating startupcache. r=glandium.
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Thu, 23 Aug 2012 15:27:21 -0400
changeset 105247 7f81af866697da01f611c31c07bb3847cfe52b2d
parent 105246 b88ccf7bd3e32478fc8c26d2cb7631a53a21dbcb
child 105248 c813eeb62b92f836087e0a44aa8288b28d14050d
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersglandium
bugs785102
milestone17.0a1
Bug 785102 - Two different libxul.so used while populating startupcache. r=glandium.
toolkit/mozapps/installer/packager.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -459,19 +459,30 @@ PRECOMPILE_DIR=XCurProcD
 PRECOMPILE_RESOURCE=app
 PRECOMPILE_GRE=$(LIBXUL_DIST)/bin
 else
 PRECOMPILE_DIR=GreD
 PRECOMPILE_RESOURCE=gre
 PRECOMPILE_GRE=$$PWD
 endif
 
+ifndef LIBXUL_SDK
+
+ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
+# FIXME: not tested on OS/2. Is it using the correct libxul?
+RUN_FROM_PWD = $(_ABS_RUN_TEST_PROGRAM)
+else
+RUN_FROM_PWD = "$$PWD/run-mozilla.sh"
+endif
+
+endif
+
 # Silence the unzip step so we don't print any binary data from the comment field.
 GENERATE_CACHE = \
-  $(_ABS_RUN_TEST_PROGRAM) $(LIBXUL_DIST)/bin/xpcshell$(BIN_SUFFIX) -g "$(PRECOMPILE_GRE)" -a "$$PWD" -f $(call core_abspath,$(MOZILLA_DIR)/toolkit/mozapps/installer/precompile_cache.js) -e "populate_startupcache('$(PRECOMPILE_DIR)', '$(OMNIJAR_NAME)', 'startupCache.zip');" && \
+  $(RUN_FROM_PWD) $(LIBXUL_DIST)/bin/xpcshell$(BIN_SUFFIX) -g "$(PRECOMPILE_GRE)" -a "$$PWD" -f $(call core_abspath,$(MOZILLA_DIR)/toolkit/mozapps/installer/precompile_cache.js) -e "populate_startupcache('$(PRECOMPILE_DIR)', '$(OMNIJAR_NAME)', 'startupCache.zip');" && \
   rm -rf jsloader jssubloader && \
   $(UNZIP) -q startupCache.zip && \
   rm startupCache.zip && \
   $(ZIP) -r9m $(OMNIJAR_NAME) jsloader/resource/$(PRECOMPILE_RESOURCE) jssubloader/*/resource/$(PRECOMPILE_RESOURCE) && \
   rm -rf jsloader jssubloader
 else
 GENERATE_CACHE = true
 endif