Commit 40dece27 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Reland "Android: Update version of retrace.jar to 6.0.3"

Reverted in: 78561f5b

Reason for reland:
 * Should now work with swarming
 * Contains fix for angle_perftest (ran locally)

The existing version was found to infinite loop at times.
Also moves the jars to CIPD

Bug: 876539, 877619
Change-Id: I9564c9b5dd6339abd1ded62d9bba98f9692a601d
Reviewed-on: https://chromium-review.googlesource.com/1188601Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586312}
parent 25113733
...@@ -950,6 +950,17 @@ deps = { ...@@ -950,6 +950,17 @@ deps = {
'condition': 'checkout_win', 'condition': 'checkout_win',
}, },
'src/third_party/proguard': {
'packages': [
{
'package': 'chromium/third_party/proguard',
'version': '3bd778c422ea5496de2ef25c007a517dbb5ce5ca',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
# Dependency of chromite.git and skia. # Dependency of chromite.git and skia.
'src/third_party/pyelftools': { 'src/third_party/pyelftools': {
'url': Var('chromium_git') + '/chromiumos/third_party/pyelftools.git' + '@' + '19b3e610c86fcadb837d252c794cb5e8008826ae', 'url': Var('chromium_git') + '/chromiumos/third_party/pyelftools.git' + '@' + '19b3e610c86fcadb837d252c794cb5e8008826ae',
......
...@@ -122,7 +122,9 @@ python_library("test_runner_py") { ...@@ -122,7 +122,9 @@ python_library("test_runner_py") {
"${android_sdk_root}/platform-tools/adb", "${android_sdk_root}/platform-tools/adb",
"//third_party/catapult/third_party/gsutil/", "//third_party/catapult/third_party/gsutil/",
"//third_party/catapult/devil/devil/devil_dependencies.json", "//third_party/catapult/devil/devil/devil_dependencies.json",
"//third_party/proguard/lib/proguard.jar", ]
deps = [
"//third_party/proguard:proguard603_java",
] ]
} }
......
...@@ -104,8 +104,6 @@ ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, ...@@ -104,8 +104,6 @@ ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT,
ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
'third_party', 'android_ndk') 'third_party', 'android_ndk')
PROGUARD_ROOT = os.path.join(DIR_SOURCE_ROOT, 'third_party', 'proguard')
BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT,
os.environ.get('CHROMIUM_OUT_DIR', 'out'), os.environ.get('CHROMIUM_OUT_DIR', 'out'),
'bad_devices.json') 'bad_devices.json')
......
...@@ -16,6 +16,7 @@ _BLACKLIST = [ ...@@ -16,6 +16,7 @@ _BLACKLIST = [
re.compile(r'.*\.py'), # Some test_support targets include python deps. re.compile(r'.*\.py'), # Some test_support targets include python deps.
re.compile(r'.*\.stamp'), # Stamp files should never be included. re.compile(r'.*\.stamp'), # Stamp files should never be included.
re.compile(r'.*\.apk'), # Should be installed separately. re.compile(r'.*\.apk'), # Should be installed separately.
re.compile(r'.*lib.java/.*'), # Never need java intermediates.
# Chrome external extensions config file. # Chrome external extensions config file.
re.compile(r'.*external_extensions\.json'), re.compile(r'.*external_extensions\.json'),
......
...@@ -31,15 +31,13 @@ _PROGUARD_ELEMENT_RES = [ ...@@ -31,15 +31,13 @@ _PROGUARD_ELEMENT_RES = [
_PROGUARD_INDENT_WIDTH = 2 _PROGUARD_INDENT_WIDTH = 2
_PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'^(\s*?)- \S+? \[(.*)\]$') _PROGUARD_ANNOTATION_VALUE_RE = re.compile(r'^(\s*?)- \S+? \[(.*)\]$')
_PROGUARD_PATH_SDK = os.path.join(
constants.PROGUARD_ROOT, 'lib', 'proguard.jar') def _GetProguardPath():
_PROGUARD_PATH_BUILT = ( # Use the one in lib.java rather than source tree because it is the one that
os.path.join(os.environ['ANDROID_BUILD_TOP'], 'external', 'proguard', # is added to swarming .isolate files.
'lib', 'proguard.jar') return os.path.join(
if 'ANDROID_BUILD_TOP' in os.environ else None) constants.GetOutDirectory(), 'lib.java', 'third_party', 'proguard',
_PROGUARD_PATH = ( 'proguard603.jar')
_PROGUARD_PATH_SDK if os.path.exists(_PROGUARD_PATH_SDK)
else _PROGUARD_PATH_BUILT)
def Dump(jar_path): def Dump(jar_path):
...@@ -96,7 +94,7 @@ def Dump(jar_path): ...@@ -96,7 +94,7 @@ def Dump(jar_path):
with tempfile.NamedTemporaryFile() as proguard_output: with tempfile.NamedTemporaryFile() as proguard_output:
cmd_helper.GetCmdStatusAndOutput([ cmd_helper.GetCmdStatusAndOutput([
'java', 'java',
'-jar', _PROGUARD_PATH, '-jar', _GetProguardPath(),
'-injars', jar_path, '-injars', jar_path,
'-dontshrink', '-dontoptimize', '-dontobfuscate', '-dontpreverify', '-dontshrink', '-dontoptimize', '-dontobfuscate', '-dontpreverify',
'-dump', proguard_output.name]) '-dump', proguard_output.name])
......
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
/perfetto /perfetto
/perl /perl
/ppapi /ppapi
/proguard/lib/
/psyco_win32 /psyco_win32
/pthreads-win32 /pthreads-win32
/py_trace_event/src /py_trace_event/src
......
...@@ -4,19 +4,21 @@ ...@@ -4,19 +4,21 @@
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
java_prebuilt("proguard_java") { # This target is used only by retrace. proguard.jar (v5.2.1) is used for
jar_path = "lib/proguard.jar" # compiling, and is reference directly via "java -jar proguar.jar"
java_prebuilt("proguard603_java") {
jar_path = "lib/proguard603.jar"
data = [ data = [
"$root_build_dir/lib.java/third_party/proguard/proguard.jar", "$root_build_dir/lib.java/third_party/proguard/proguard603.jar",
] ]
} }
java_prebuilt("retrace_java") { java_prebuilt("retrace_java") {
jar_path = "lib/retrace.jar" jar_path = "lib/retrace603.jar"
deps = [ deps = [
":proguard_java", ":proguard603_java",
] ]
data = [ data = [
"$root_build_dir/lib.java/third_party/proguard/retrace.jar", "$root_build_dir/lib.java/third_party/proguard/retrace603.jar",
] ]
} }
Name: Proguard Name: Proguard
URL: http://proguard.sourceforge.net/ URL: http://proguard.sourceforge.net/
Version: 5.2.1 Version: 5.2.1_and_6.0.3
Date: June 22, 2016 Date: June 22, 2016
License: GPL v2 License: GPL v2
License File: NOT_SHIPPED License File: NOT_SHIPPED
...@@ -10,3 +10,7 @@ Description: ...@@ -10,3 +10,7 @@ Description:
This directory includes proguard.jar to allow Chromium to shrink, optimize java This directory includes proguard.jar to allow Chromium to shrink, optimize java
classes for Android, as well as retrace.jar, to allow for deobfuscation of stack classes for Android, as well as retrace.jar, to allow for deobfuscation of stack
traces. traces.
Proguard is kept at 5.2.1 because all newer versions were found to optimize in a
way that breaks Chrome. Retrace is at 6.0.3 because version 5.2.1 was found to
infinite loop when deobfuscating certainly strings.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml
package: chromium/third_party/proguard
data:
- file: lib/proguard.jar
- file: lib/proguard603.jar
- file: lib/retrace603.jar
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment