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

Side by Side Diff: runtime/BUILD.gn

Issue 2645323002: Add support for configurable -OX optimization levels for debug builds (Closed)
Patch Set: Move --debug-opt-level after --no-clang in tools/gn.py 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 unified diff | Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | tools/gn.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 declare_args() { 5 declare_args() {
6 # Instead of using is_debug, we introduce a different flag for specifying a 6 # Instead of using is_debug, we introduce a different flag for specifying a
7 # Debug build of Dart so that clients can still use a Release build of Dart 7 # Debug build of Dart so that clients can still use a Release build of Dart
8 # while themselves doing a Debug build. 8 # while themselves doing a Debug build.
9 dart_debug = false 9 dart_debug = false
10 10
(...skipping 10 matching lines...) Expand all
21 # of the Dart VM should leave this set to "develop", and should set 21 # of the Dart VM should leave this set to "develop", and should set
22 # 'is_debug', 'is_release', or 'is_product'. 22 # 'is_debug', 'is_release', or 'is_product'.
23 dart_runtime_mode = "develop" 23 dart_runtime_mode = "develop"
24 24
25 # Explicitly set the target architecture in case of precompilation. Leaving 25 # Explicitly set the target architecture in case of precompilation. Leaving
26 # this unspecified results in automatic target architecture detection. 26 # this unspecified results in automatic target architecture detection.
27 # Available options are: arm, arm64, mips, x64 and ia32 27 # Available options are: arm, arm64, mips, x64 and ia32
28 dart_target_arch = "" 28 dart_target_arch = ""
29 29
30 dart_experimental_interpreter = false 30 dart_experimental_interpreter = false
31
32 # The optimization level to use for debug builds.
33 dart_debug_optimization_level = "2"
31 } 34 }
32 35
33 config("dart_public_config") { 36 config("dart_public_config") {
34 include_dirs = [ "." ] 37 include_dirs = [ "." ]
35 } 38 }
36 39
37 # Adds PRODUCT define if Flutter has specified "release" for dart_runtime_mode 40 # Adds PRODUCT define if Flutter has specified "release" for dart_runtime_mode
38 config("dart_maybe_product_config") { 41 config("dart_maybe_product_config") {
39 defines = [] 42 defines = []
40 43
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 "-Wvla", 159 "-Wvla",
157 "-Wno-conversion-null", 160 "-Wno-conversion-null",
158 "-Woverloaded-virtual", 161 "-Woverloaded-virtual",
159 "-g3", 162 "-g3",
160 "-ggdb3", 163 "-ggdb3",
161 "-fno-rtti", 164 "-fno-rtti",
162 "-fno-exceptions", 165 "-fno-exceptions",
163 ] 166 ]
164 167
165 if (dart_debug) { 168 if (dart_debug) {
166 cflags += [ "-O2" ] 169 cflags += [ "-O${dart_debug_optimization_level}" ]
167 } else { 170 } else {
168 cflags += [ "-O3" ] 171 cflags += [ "-O3" ]
169 } 172 }
170 173
171 ldflags = [] 174 ldflags = []
172 if (defined(is_asan) && is_asan) { 175 if (defined(is_asan) && is_asan) {
173 ldflags += [ "-fsanitize=address" ] 176 ldflags += [ "-fsanitize=address" ]
174 } 177 }
175 if (defined(is_msan) && is_msan) { 178 if (defined(is_msan) && is_msan) {
176 ldflags += [ "-fsanitize=memory" ] 179 ldflags += [ "-fsanitize=memory" ]
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 "third_party/double-conversion/src:libdouble_conversion", 293 "third_party/double-conversion/src:libdouble_conversion",
291 "vm:libdart_lib", 294 "vm:libdart_lib",
292 "vm:libdart_lib_nosnapshot", 295 "vm:libdart_lib_nosnapshot",
293 "vm:libdart_vm", 296 "vm:libdart_vm",
294 "vm:libdart_vm_nosnapshot", 297 "vm:libdart_vm_nosnapshot",
295 ] 298 ]
296 sources = [ 299 sources = [
297 "vm/libdart_dependency_helper.cc", 300 "vm/libdart_dependency_helper.cc",
298 ] 301 ]
299 } 302 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | tools/gn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698