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

Unified Diff: build/android/gyp/util/proguard_util.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 | « build/android/gyp/proguard.py ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/proguard_util.py
diff --git a/build/android/gyp/util/proguard_util.py b/build/android/gyp/util/proguard_util.py
index d7603d38432ebb8300b6b67390f791be39abc499..f1449c8b9884b46f21b925afae542eeaf3ea224c 100644
--- a/build/android/gyp/util/proguard_util.py
+++ b/build/android/gyp/util/proguard_util.py
@@ -45,6 +45,7 @@ class ProguardCmdBuilder(object):
self._outjar = None
self._cmd = None
self._verbose = False
+ self._disabled_optimizations = []
def outjar(self, path):
assert self._cmd is None
@@ -87,6 +88,10 @@ class ProguardCmdBuilder(object):
assert self._cmd is None
self._verbose = verbose
+ def disable_optimizations(self, optimizations):
+ assert self._cmd is None
+ self._disabled_optimizations += optimizations
+
def build(self):
if self._cmd:
return self._cmd
@@ -123,6 +128,9 @@ class ProguardCmdBuilder(object):
'-libraryjars', ':'.join(self._libraries),
]
+ for optimization in self._disabled_optimizations:
+ cmd += [ '-optimizations', '!' + optimization ]
+
cmd += [
'-injars', ':'.join(self._injars)
]
« no previous file with comments | « build/android/gyp/proguard.py ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698