Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3751)

Unified Diff: build/android/gyp/proguard.py

Issue 2127973003: Turning on optimizations for chromium code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testapk
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/gyp/util/proguard_util.py » ('j') | build/android/gyp/util/proguard_util.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/proguard.py
diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py
index d019350a33ce56bd05c4d051f2757a99630e7c6f..e0381a18fe008e7b122d4dac390052dab51ca58f 100755
--- a/build/android/gyp/proguard.py
+++ b/build/android/gyp/proguard.py
@@ -12,6 +12,15 @@ from util import build_utils
from util import proguard_util
+DANGEROUS_OPTIMIZATIONS = [
agrieve 2016/07/07 15:30:06 nit: prefix with _ to denote as private to the mod
smaier 2016/07/08 14:59:10 Done.
+ # See crbug.com/625992
+ "code/allocation/variable",
+ # See crbug.com/625994
+ "field/propagation/value",
+ "method/propagation/parameter",
+ "method/propagation/returnvalue",
+]
+
def _ParseOptions(args):
parser = optparse.OptionParser()
build_utils.AddDepfileOption(parser)
@@ -31,6 +40,9 @@ def _ParseOptions(args):
parser.add_option('--classpath', action='append',
help='Classpath for proguard.')
parser.add_option('--stamp', help='Path to touch on success.')
+ parser.add_option('--enable-dangerous-optimizations', action='store_true',
+ help='Turn on optimizations that are broken on public '
agrieve 2016/07/07 15:30:06 nit: "Turn on optimizations which are known to hav
smaier 2016/07/08 14:59:10 Done.
+ 'proguard.')
parser.add_option('--verbose', '-v', action='store_true',
help='Print all proguard output')
@@ -62,6 +74,8 @@ def main(args):
classpath = list(set(options.classpath))
proguard.libraryjars(classpath)
proguard.verbose(options.verbose)
+ if not options.enable_dangerous_optimizations:
+ proguard.disable_optimizations(DANGEROUS_OPTIMIZATIONS)
input_paths = proguard.GetInputs()
« no previous file with comments | « no previous file | build/android/gyp/util/proguard_util.py » ('j') | build/android/gyp/util/proguard_util.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698