| OLD | NEW |
| 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 # TODO(zra): These build arguments should likely be moved to a gni file that is | 5 # TODO(zra): These build arguments should likely be moved to a gni file that is |
| 6 # included in BUILD.gn files that care about the values of the flags. For now, | 6 # included in BUILD.gn files that care about the values of the flags. For now, |
| 7 # since the GN build only happens as part of a Mojo build there is no need for | 7 # since the GN build only happens as part of a Mojo build there is no need for |
| 8 # the indirection. | 8 # the indirection. |
| 9 declare_args() { | 9 declare_args() { |
| 10 # Instead of using is_debug, we introduce a different flag for specifying a | 10 # Instead of using is_debug, we introduce a different flag for specifying a |
| 11 # Debug build of Dart so that clients can still use a Release build of Dart | 11 # Debug build of Dart so that clients can still use a Release build of Dart |
| 12 # while themselves doing a Debug build. | 12 # while themselves doing a Debug build. |
| 13 dart_debug = false | 13 dart_debug = false |
| 14 | 14 |
| 15 # Product mode drops many features (e.g. debugger, profiler, etc) in order to |
| 16 # shrink download size and decrease memory and cpu usage. |
| 17 dart_product = false |
| 18 |
| 15 # Explicitly set the target architecture in case of precompilation. Leaving | 19 # Explicitly set the target architecture in case of precompilation. Leaving |
| 16 # this unspecified results in automatic target architecture detection. | 20 # this unspecified results in automatic target architecture detection. |
| 17 # Available options are: arm, arm64, mips, x64 and ia32 | 21 # Available options are: arm, arm64, mips, x64 and ia32 |
| 18 dart_target_arch = "" | 22 dart_target_arch = "" |
| 19 } | 23 } |
| 20 | 24 |
| 21 config("dart_public_config") { | 25 config("dart_public_config") { |
| 22 include_dirs = [ | 26 include_dirs = [ |
| 23 ".", | 27 ".", |
| 24 ] | 28 ] |
| (...skipping 18 matching lines...) Expand all Loading... |
| 43 assert(false) | 47 assert(false) |
| 44 } | 48 } |
| 45 } | 49 } |
| 46 | 50 |
| 47 if (dart_debug) { | 51 if (dart_debug) { |
| 48 defines += ["DEBUG"] | 52 defines += ["DEBUG"] |
| 49 } else { | 53 } else { |
| 50 defines += ["NDEBUG"] | 54 defines += ["NDEBUG"] |
| 51 } | 55 } |
| 52 | 56 |
| 57 if (dart_product) { |
| 58 if (dart_debug) { |
| 59 print("Debug and product mode are mutually exclusive.") |
| 60 } |
| 61 assert(!dart_debug) |
| 62 defines += ["PRODUCT"] |
| 63 } |
| 64 |
| 65 |
| 53 if (is_ios || is_mac) { | 66 if (is_ios || is_mac) { |
| 54 defines += ["DART_PRECOMPILER"] | 67 defines += ["DART_PRECOMPILER"] |
| 55 } | 68 } |
| 56 | 69 |
| 57 cflags = [ | 70 cflags = [ |
| 58 "-Werror", | 71 "-Werror", |
| 59 "-Wall", | 72 "-Wall", |
| 60 "-Wextra", # Also known as -W. | 73 "-Wextra", # Also known as -W. |
| 61 "-Wno-unused-parameter", | 74 "-Wno-unused-parameter", |
| 62 "-Wnon-virtual-dtor", | 75 "-Wnon-virtual-dtor", |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 assert(false) | 119 assert(false) |
| 107 } | 120 } |
| 108 } | 121 } |
| 109 | 122 |
| 110 if (dart_debug) { | 123 if (dart_debug) { |
| 111 defines += ["DEBUG"] | 124 defines += ["DEBUG"] |
| 112 } else { | 125 } else { |
| 113 defines += ["NDEBUG"] | 126 defines += ["NDEBUG"] |
| 114 } | 127 } |
| 115 | 128 |
| 129 if (dart_product) { |
| 130 if (dart_debug) { |
| 131 print("Debug and product mode are mutually exclusive.") |
| 132 } |
| 133 assert(!dart_debug) |
| 134 defines += ["PRODUCT"] |
| 135 } |
| 136 |
| 116 cflags = [ | 137 cflags = [ |
| 117 "-Werror", | 138 "-Werror", |
| 118 "-Wall", | 139 "-Wall", |
| 119 "-Wextra", # Also known as -W. | 140 "-Wextra", # Also known as -W. |
| 120 "-Wno-unused-parameter", | 141 "-Wno-unused-parameter", |
| 121 "-Wnon-virtual-dtor", | 142 "-Wnon-virtual-dtor", |
| 122 "-Wvla", | 143 "-Wvla", |
| 123 "-Wno-conversion-null", | 144 "-Wno-conversion-null", |
| 124 "-Woverloaded-virtual", | 145 "-Woverloaded-virtual", |
| 125 "-g3", | 146 "-g3", |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 "vm:libdart_lib_nosnapshot", | 254 "vm:libdart_lib_nosnapshot", |
| 234 "vm:libdart_lib", | 255 "vm:libdart_lib", |
| 235 "vm:libdart_vm", | 256 "vm:libdart_vm", |
| 236 "vm:libdart_platform", | 257 "vm:libdart_platform", |
| 237 "third_party/double-conversion/src:libdouble_conversion", | 258 "third_party/double-conversion/src:libdouble_conversion", |
| 238 ] | 259 ] |
| 239 sources = [ | 260 sources = [ |
| 240 "vm/libdart_dependency_helper.cc", | 261 "vm/libdart_dependency_helper.cc", |
| 241 ] | 262 ] |
| 242 } | 263 } |
| OLD | NEW |