Backed out changeset 1da1df814ad3 (bug 1352599)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 12 Oct 2017 23:42:00 +0200
changeset 436693 fbc942d188228d69b3f6d33eeaa45cce2a9e808a
parent 436692 11376fd5366ebe76c926e2e919245e5039c0b9e4
child 436694 6c9706f9f534eb684abbb11c72cdb6f31d94c272
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1352599
milestone58.0a1
backs out1da1df814ad3bcb7aefb5f2c00c18b3c55f72284
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 changeset 1da1df814ad3 (bug 1352599)
build/moz.configure/java.configure
mobile/android/base/Makefile.in
mobile/android/config/mozconfigs/common
taskcluster/ci/l10n/kind.yml
taskcluster/ci/nightly-l10n/kind.yml
--- a/build/moz.configure/java.configure
+++ b/build/moz.configure/java.configure
@@ -39,17 +39,17 @@ def check_java_tool(tool):
             die("The program %s was not found.  Set $JAVA_HOME to your Java "
                 "SDK directory or use '--with-java-bin-path={java-bin-dir}'"
                 % tool)
         return result
 
     return require_tool
 
 
-java = check_java_tool('java')
+check_java_tool('java')
 check_java_tool('javah')
 check_java_tool('jar')
 check_java_tool('jarsigner')
 check_java_tool('keytool')
 javac = check_java_tool('javac')
 
 
 @depends(javac)
@@ -61,56 +61,8 @@ def javac_version(javac):
                                          stderr=subprocess.STDOUT).rstrip()
         version = Version(output.split(' ')[-1])
         if version < '1.8':
             die('javac 1.8 or higher is required (found %s). '
                 'Check the JAVA_HOME environment variable.' % version)
         return version
     except subprocess.CalledProcessError as e:
         die('Failed to get javac version: %s', e.output)
-
-# Proguard detection
-# ========================================================
-@dependable
-@imports('os')
-def proguard_jar_default():
-    # By default, look for proguard.jar in the location to which `mach
-    # bootstrap` or `mach artifact toolchain` will install Proguard.
-    mozbuild_state_dir = os.environ.get('MOZBUILD_STATE_PATH',
-                                        os.path.expanduser(os.path.join('~', '.mozbuild')))
-    return os.path.join(mozbuild_state_dir, 'proguard', 'lib', 'proguard.jar')
-
-# Proguard is really required; we provide a good error message when
-# validating.
-option(env='PROGUARD_JAR', nargs=1, default=proguard_jar_default, help='Path to proguard.jar')
-
-@depends(java, 'PROGUARD_JAR')
-@checking('for proguard.jar version')
-@imports('os')
-@imports('subprocess')
-# Not Python 3 compatible, but neither is the subprocess invocation.
-@imports(_from='exceptions', _import='Exception')
-def valid_proguard(java, proguard_jar):
-    if not proguard_jar or not os.path.isfile(proguard_jar[0]):
-        die('proguard.jar 5.3.3 or higher is required (looked for %s). '
-            'Run |mach artifact install --from-build proguard-jar| or add '
-            '`export PROGUARD_JAR=/path/to/proguard.jar` to your mozconfig.' % proguard_jar[0])
-
-    try:
-        output = subprocess.check_output([java, '-jar', proguard_jar[0]])
-        # Exit code zero shouldn't happen.
-        die('Expected `java -jar {}` to fail (with version in output) but got exit code 0'
-            .format(proguard_jar[0]))
-
-    except subprocess.CalledProcessError as e:
-        # Exit code is non zero and output is like
-        # ProGuard, version 5.3.3
-        # Usage: java proguard.ProGuard [options ...]
-        output = e.output
-
-    version = Version(e.output.splitlines()[0].split(' ')[-1])
-    if version < '5.3.3':
-        die('proguard.jar 5.3.3 or higher is required (found %s). '
-            'Run |mach bootstrap| to upgrade. ' % version)
-
-    return proguard_jar[0]
-
-set_config('PROGUARD_JAR', valid_proguard)
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -280,37 +280,37 @@ classycle_jar := $(topsrcdir)/mobile/and
 # sometimes corrupt this information if present (which it does for some of the
 # included libraries). This corruption prevents dex from completing, so we need
 # to get rid of it.  This prevents us from seeing line numbers in stack traces
 # for stack frames inside libraries.
 #
 # This step can occur much earlier than the main Proguard pass: it needs only
 # gecko-R.jar to have been compiled (as that's where the library R.java files
 # end up), but it does block the main Proguard pass.
-.bundled.proguard.deps: gecko-R.jar $(proguard_config_dir)/strip-libs.cfg $(PROGUARD_JAR)
+.bundled.proguard.deps: gecko-R.jar $(proguard_config_dir)/strip-libs.cfg
 	$(REPORT_BUILD)
 	@$(TOUCH) $@
 	$(JAVA) \
 		-Xmx512m -Xms128m \
-		-jar $(PROGUARD_JAR) \
+		-jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
 		@$(proguard_config_dir)/strip-libs.cfg \
 		-injars $(subst ::,:,$(java_bundled_libs))\
 		-outjars bundled-jars-nodebug \
 		-libraryjars $(library_jars):gecko-R.jar
 
 # We touch the target file before invoking Proguard so that Proguard's
 # outputs are fresher than the target, preventing a subsequent
 # invocation from thinking Proguard's outputs are stale.  This is safe
 # because Make removes the target file if any recipe command fails.
-.proguard.deps: .geckoview.deps .bundled.proguard.deps $(ALL_JARS) $(proguard_config_dir)/proguard.cfg $(PROGUARD_JAR)
+.proguard.deps: .geckoview.deps .bundled.proguard.deps $(ALL_JARS) $(proguard_config_dir)/proguard.cfg
 	$(REPORT_BUILD)
 	@$(TOUCH) $@
 	$(JAVA) \
 		-Xmx512m -Xms128m \
-		-jar $(PROGUARD_JAR) \
+		-jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
 		@$(proguard_config_dir)/proguard.cfg \
 		-optimizationpasses $(PROGUARD_PASSES) \
 		-injars $(subst ::,:,$(all_jars_classpath)):bundled-jars-nodebug \
 		-outjars jars-proguarded \
 		-libraryjars $(library_jars)
 
 ANNOTATION_PROCESSOR_JAR_FILES := $(abspath $(DEPTH)/build/annotationProcessors/annotationProcessors.jar)
 
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -103,10 +103,8 @@ fi
 export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 . "$topsrcdir/build/unix/mozconfig.stdcxx"
 
 JS_BINARY="$topsrcdir/mobile/android/config/js_wrapper.sh"
-
-export PROGUARD_JAR="$topsrcdir/proguard/lib/proguard.jar"
--- a/taskcluster/ci/l10n/kind.yml
+++ b/taskcluster/ci/l10n/kind.yml
@@ -41,21 +41,16 @@ job-template:
          android-api-16-l10n: 18000
    docker-image:
       by-build-platform:
          default:
            in-tree: desktop-build
          android-api-16-l10n:
            in-tree: android-build
          win.*: null
-   toolchains:
-      by-build-platform:
-         default: []
-         android-api-16-l10n:
-            - proguard-jar
    tooltool:
       by-build-platform:
          default: public
          android-api-16-l10n: internal
          macosx64-nightly: internal
    worker-type:
       by-build-platform:
          default: aws-provisioner-v1/gecko-{level}-b-linux
--- a/taskcluster/ci/nightly-l10n/kind.yml
+++ b/taskcluster/ci/nightly-l10n/kind.yml
@@ -44,21 +44,16 @@ job-template:
          android-api-16-nightly: 18000
    docker-image:
       by-build-platform:
          default:
            in-tree: desktop-build
          android-api-16-nightly:
            in-tree: android-build
          win.*: null
-   toolchains:
-      by-build-platform:
-         default: []
-         android-api-16-nightly:
-            - proguard-jar
    tooltool:
       by-build-platform:
          default: public
          android-api-16-nightly: internal
          macosx64-nightly: internal
          win32-nightly: internal
          win64-nightly: internal
    index: