Backed out changeset 1da1df814ad3 (bug 1352599)

This commit is contained in:
Sebastian Hengst 2017-10-12 23:42:00 +02:00
Родитель 6c02d12cff
Коммит aa9035ca52
5 изменённых файлов: 5 добавлений и 65 удалений

Просмотреть файл

@ -44,7 +44,7 @@ def check_java_tool(tool):
return require_tool
java = check_java_tool('java')
check_java_tool('java')
check_java_tool('javah')
check_java_tool('jar')
check_java_tool('jarsigner')
@ -66,51 +66,3 @@ def javac_version(javac):
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)

Просмотреть файл

@ -285,12 +285,12 @@ classycle_jar := $(topsrcdir)/mobile/android/build/classycle/classycle-1.4.1.jar
# 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 \
@ -300,12 +300,12 @@ classycle_jar := $(topsrcdir)/mobile/android/build/classycle/classycle-1.4.1.jar
# 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 \

Просмотреть файл

@ -108,5 +108,3 @@ 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"

Просмотреть файл

@ -46,11 +46,6 @@ job-template:
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

Просмотреть файл

@ -49,11 +49,6 @@ job-template:
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