Chromium Code Reviews| 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() |