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

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: rebased 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') | no next file with comments »
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..10291d2593dc89be59b9d1723f8a9b9d4fd382a1 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 = [
+ # 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,8 @@ 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='Enable optimizations which are known to have issues.')
parser.add_option('--verbose', '-v', action='store_true',
help='Print all proguard output')
@@ -62,6 +73,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698