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

Unified Diff: tools/gn.py

Issue 2645323002: Add support for configurable -OX optimization levels for debug builds (Closed)
Patch Set: Make the --debug-opt-level be a string (e.g. for "s"), add debug_optimization_level Created 3 years, 11 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
« build/config/compiler/BUILD.gn ('K') | « runtime/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn.py
diff --git a/tools/gn.py b/tools/gn.py
index df6e36ec05805bc2f14f9139445d1a3124a309ca..5b682a5dfe0ce4856d4c3eddb5b522ff7ee5e2b7 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -205,6 +205,10 @@ def to_gn_args(args, mode, arch, target_os):
gn_args['use_goma'] = False
gn_args['goma_dir'] = None
+ if args.debug_opt_level:
+ gn_args['dart_debug_optimization_level'] = args.debug_opt_level
+ gn_args['debug_optimization_level'] = args.debug_opt_level
+
return gn_args
@@ -309,6 +313,10 @@ def parse_args(args):
help='Use Clang',
default=True,
action='store_true')
+ other_group.add_argument('--debug-opt-level',
zra 2017/01/24 16:00:36 Let's leave --clang and --no-clang adjacent, and m
kustermann 2017/01/24 16:36:18 Done.
+ '-d',
+ help='The optimization level to use for debug builds',
+ type=str)
other_group.add_argument('--no-clang',
help='Disable Clang',
dest='clang',
« build/config/compiler/BUILD.gn ('K') | « runtime/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698