Backed out changesets 6948901b128f and d9a099b06911 (bug 946083) and changeset 1e038f308b8d (bug 961339) for intermittent Android build failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 11 Feb 2014 09:35:12 -0500
changeset 168070 e52a4ab158eeaf20d6c102a9d47bce9db39d44b6
parent 168069 4a99ebc2f515c836c96d492447666e1c587294b6
child 168071 ad74d750e5a546381aefaac68e79c9920c1e1734
push id39636
push userryanvm@gmail.com
push dateTue, 11 Feb 2014 14:35:12 +0000
treeherdermozilla-inbound@e52a4ab158ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs946083, 961339
milestone30.0a1
backs out6948901b128fbbd9a1d68f116031e0f4cf7240fa
d9a099b06911ba8ff2d88c9a2a5b8b317d3959c1
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
Backed out changesets 6948901b128f and d9a099b06911 (bug 946083) and changeset 1e038f308b8d (bug 961339) for intermittent Android build failures.
config/makefiles/java-build.mk
mobile/android/base/Makefile.in
--- a/config/makefiles/java-build.mk
+++ b/config/makefiles/java-build.mk
@@ -78,27 +78,19 @@ endif #} ANDROID_APK_NAME
 ifdef JAVA_JAR_TARGETS #{
 # Arg 1: Output target name with .jar suffix, like jars/jarfile.jar.
 #        Intermediate class files are generated in jars/jarfile-classes.
 # Arg 2: Java sources list.  We use VPATH and $^ so sources can be
 #        relative to $(srcdir) or $(CURDIR).
 # Arg 3: List of extra jars to link against.  We do not use VPATH so
 #        jars must be relative to $(CURDIR).
 # Arg 4: Additional JAVAC_FLAGS.
-
-# Note: Proguard fails when stale .class files corresponding to
-# removed inner classes are present in the object directory.  These
-# stale class files get packaged into the .jar file, which then gets
-# processed by Proguard.  To work around this, we always delete any
-# existing jarfile-classes directory and start fresh.
-
 define java_jar_template
 $(1): $(2) $(3)
 	$$(REPORT_BUILD)
-	@$$(RM) -rf $(1:.jar=)-classes
 	@$$(NSINSTALL) -D $(1:.jar=)-classes
 	@$$(if $$(filter-out .,$$(@D)),$$(NSINSTALL) -D $$(@D))
 	$$(JAVAC) $$(JAVAC_FLAGS)\
     $(4)\
 		-d $(1:.jar=)-classes\
 		$(if $(strip $(3)),-classpath $(subst $(NULL) ,:,$(strip $(3))))\
 		$$(filter %.java,$$^)
 	$$(JAR) cMf $$@ -C $(1:.jar=)-classes .
@@ -106,16 +98,16 @@ define java_jar_template
 GARBAGE += $(1)
 
 GARBAGE_DIRS += $(1:.jar=)-classes
 endef
 
 $(foreach jar,$(JAVA_JAR_TARGETS),\
   $(if $($(jar)_DEST),,$(error Missing $(jar)_DEST))\
   $(if $($(jar)_JAVAFILES),,$(error Missing $(jar)_JAVAFILES))\
-  $(eval $(call java_jar_template,$($(jar)_DEST),$($(jar)_JAVAFILES) $(addprefix $(CURDIR)/,$($(jar)_PP_JAVAFILES)),$($(jar)_EXTRA_JARS),$($(jar)_JAVAC_FLAGS)))\
+  $(eval $(call java_jar_template,$($(jar)_DEST),$($(jar)_JAVAFILES) $($(jar)_PP_JAVAFILES),$($(jar)_EXTRA_JARS),$($(jar)_JAVAC_FLAGS)))\
 )
 endif #} JAVA_JAR_TARGETS
 
 
 INCLUDED_JAVA_BUILD_MK := 1
 
 endif #} INCLUDED_JAVA_BUILD_MK
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -76,39 +76,32 @@ endif
 include $(topsrcdir)/config/config.mk
 
 # Note that we're going to set up a dependency directly between embed_android.dex and the java files
 # Instead of on the .class files, since more than one .class file might be produced per .java file
 # Sync dependencies are provided in a single jar. Sync classes themselves are delivered as source,
 # because Android resource classes must be compiled together in order to avoid overlapping resource
 # indices.
 
-classes.dex: .proguard.deps
-	$(REPORT_BUILD)
+classes.dex: proguard-jars
+	@echo 'DX classes.dex'
 	$(DX) --dex --output=classes.dex jars-proguarded $(ANDROID_COMPAT_LIB)
 
 ifdef MOZ_DISABLE_PROGUARD
   PROGUARD_PASSES=0
 else
   ifdef MOZ_DEBUG
   PROGUARD_PASSES=1
   else
   PROGUARD_PASSES=6
   endif
 endif
 
-.proguard.deps: $(ALL_JARS)
-	$(REPORT_BUILD)
-	java -jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
-		@$(topsrcdir)/mobile/android/config/proguard.cfg \
-		-optimizationpasses $(PROGUARD_PASSES) \
-		-injars $(subst ::,:,$(subst $(NULL) ,:,$(strip $(ALL_JARS)))) \
-		-outjars jars-proguarded \
-		-libraryjars $(ANDROID_SDK)/android.jar:$(ANDROID_COMPAT_LIB)
-	@$(TOUCH) $@
+proguard-jars: $(ALL_JARS)
+	java -jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar @$(topsrcdir)/mobile/android/config/proguard.cfg -optimizationpasses $(PROGUARD_PASSES) -injars $(subst ::,:,$(subst $(NULL) ,:,$(strip $(ALL_JARS)))) -outjars jars-proguarded -libraryjars $(ANDROID_SDK)/android.jar:$(ANDROID_COMPAT_LIB)
 
 CLASSES_WITH_JNI= \
     org.mozilla.gecko.GeckoAppShell \
     org.mozilla.gecko.GeckoJavaSampler \
     org.mozilla.gecko.gfx.NativePanZoomController \
     org.mozilla.gecko.ANRReporter \
     $(NULL)
 
@@ -223,37 +216,36 @@ all_resources = \
   $(CURDIR)/WebAppManifestFragment.xml.frag \
   $(android_res_files) \
   $(ANDROID_GENERATED_RESFILES) \
   $(NULL)
 
 # All of generated/org/mozilla/gecko/R.java, gecko.ap_, and R.txt are
 # produced by aapt; this saves aapt invocations.
 
-$(CURDIR)/$(gecko_package_dir)/R.java: .aapt.deps
+$(gecko_package_dir)/R.java: .aapt.deps
 gecko.ap_: .aapt.deps
 R.txt: .aapt.deps
 
 # [Comment 2/3] This tom-foolery provides a target that forces a
 # rebuild of gecko.ap_.  This is used during packaging to ensure that
 # resources are fresh.  The alternative would be complicated; see
 # [Comment 1/3].
 
-$(CURDIR)/gecko-nodeps/R.java: .aapt.nodeps
+gecko-nodeps/R.java: .aapt.nodeps
 gecko-nodeps.ap_: .aapt.nodeps
 gecko-nodeps/R.txt: .aapt.nodeps
 
 # 1: target file.
 # 2: dependencies.
 # 3: name of ap_ file to write.
 # 4: directory to write R.java into.
 # 5: directory to write R.txt into.
 define aapt_command
 $(1): $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2)
-	$$(REPORT_BUILD)
 	$$(AAPT) package -f -M AndroidManifest.xml -I $$(ANDROID_SDK)/android.jar \
 		--auto-add-overlay \
 		$$(addprefix -S ,$$(ANDROID_RES_DIRS)) \
 		--custom-package org.mozilla.gecko --non-constant-id \
 		-F $(3) \
 		-J $(4) \
 		--output-text-symbols $(5)
 	@$$(TOUCH) $$@
@@ -267,18 +259,17 @@ endef
 # toolkit/mozapps/installer/packager.mk.
 
 # .aapt.deps: $(all_resources)
 $(eval $(call aapt_command,.aapt.deps,$(all_resources),gecko.ap_,$(gecko_package_dir)/,./))
 
 # .aapt.nodeps: $(CURDIR)/AndroidManifest.xml FORCE
 $(eval $(call aapt_command,.aapt.nodeps,$(CURDIR)/AndroidManifest.xml FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/))
 
-fennec_ids.txt: $(CURDIR)/$(gecko_package_dir)/R.java fennec-ids-generator.py
-	$(REPORT_BUILD)
+fennec_ids.txt: $(gecko_package_dir)/R.java fennec-ids-generator.py
 	$(PYTHON) $(topsrcdir)/mobile/android/base/fennec-ids-generator.py -i $< -o $@
 
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
 
 libs:: geckoview_resources.zip classes.dex jni-stubs.inc GeneratedJNIWrappers.cpp fennec_ids.txt
 	$(INSTALL) geckoview_resources.zip $(FINAL_TARGET)
 	$(INSTALL) classes.dex $(FINAL_TARGET)