| 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   # Set the runtime mode. This affects how the runtime is built and what | 15   # Set the runtime mode. This affects how the runtime is built and what | 
| 16   # features it has. Valid values are: | 16   # features it has. Valid values are: | 
| 17   # 'develop' (the default) - VM is built to run as a JIT with all development | 17   # 'develop' (the default) - VM is built to run as a JIT with all development | 
| 18   # features enabled. | 18   # features enabled. | 
| 19   # 'profile' - The VM is built to run with AOT compiled code with only the | 19   # 'profile' - The VM is built to run with AOT compiled code with only the | 
| 20   # CPU profiling features enabled. | 20   # CPU profiling features enabled. | 
| 21   # 'release' - The VM is built to run with AOT compiled code with no developer | 21   # 'release' - The VM is built to run with AOT compiled code with no developer | 
| 22   # features enabled. | 22   # features enabled. | 
| 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 | 
|  | 30   dart_experimental_interpreter = false | 
| 29 } | 31 } | 
| 30 | 32 | 
| 31 config("dart_public_config") { | 33 config("dart_public_config") { | 
| 32   include_dirs = [ | 34   include_dirs = [ | 
| 33     ".", | 35     ".", | 
| 34   ] | 36   ] | 
| 35 } | 37 } | 
| 36 | 38 | 
| 37 # Controls PRODUCT #define. | 39 # Controls PRODUCT #define. | 
| 38 config("dart_product_config") { | 40 config("dart_product_config") { | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 63       (dart_runtime_mode != "release")) { | 65       (dart_runtime_mode != "release")) { | 
| 64     print("Invalid |dart_runtime_mode|") | 66     print("Invalid |dart_runtime_mode|") | 
| 65     assert(false) | 67     assert(false) | 
| 66   } | 68   } | 
| 67 | 69 | 
| 68   if (dart_runtime_mode == "release") { | 70   if (dart_runtime_mode == "release") { | 
| 69     if (dart_debug) { | 71     if (dart_debug) { | 
| 70       print("Debug and release mode are mutually exclusive.") | 72       print("Debug and release mode are mutually exclusive.") | 
| 71     } | 73     } | 
| 72     assert(!dart_debug) | 74     assert(!dart_debug) | 
| 73     defines += ["DART_PRECOMPILED_RUNTIME"] | 75 | 
|  | 76     if (!dart_experimental_interpreter) { | 
|  | 77       defines += ["DART_PRECOMPILED_RUNTIME"] | 
|  | 78     } | 
| 74   } else if (dart_runtime_mode == "profile") { | 79   } else if (dart_runtime_mode == "profile") { | 
| 75     if (dart_debug) { | 80     if (dart_debug) { | 
| 76       print("Debug and profile mode are mutually exclusive.") | 81       print("Debug and profile mode are mutually exclusive.") | 
| 77     } | 82     } | 
| 78     assert(!dart_debug) | 83     assert(!dart_debug) | 
| 79     defines += ["DART_PRECOMPILED_RUNTIME"] | 84 | 
|  | 85     if (!dart_experimental_interpreter) { | 
|  | 86       defines += ["DART_PRECOMPILED_RUNTIME"] | 
|  | 87     } | 
| 80   } | 88   } | 
| 81 } | 89 } | 
| 82 | 90 | 
| 83 # Controls DART_PRECOMPILER #define. | 91 # Controls DART_PRECOMPILER #define. | 
| 84 config("dart_precompiler_config") { | 92 config("dart_precompiler_config") { | 
| 85   defines = [] | 93   defines = [] | 
| 86   defines += ["DART_PRECOMPILER"] | 94   defines += ["DART_PRECOMPILER"] | 
| 87 } | 95 } | 
| 88 | 96 | 
| 89 config("dart_config") { | 97 config("dart_config") { | 
| 90   defines = [] | 98   defines = [] | 
| 91 | 99 | 
|  | 100   if (dart_experimental_interpreter) { | 
|  | 101     dart_target_arch = "dbc" | 
|  | 102   } | 
|  | 103 | 
| 92   if (dart_target_arch != "") { | 104   if (dart_target_arch != "") { | 
| 93     if (dart_target_arch == "arm") { | 105     if (dart_target_arch == "arm") { | 
| 94       defines += [ "TARGET_ARCH_ARM" ] | 106       defines += [ "TARGET_ARCH_ARM" ] | 
| 95     } else if (dart_target_arch == "arm64") { | 107     } else if (dart_target_arch == "arm64") { | 
| 96       defines += [ "TARGET_ARCH_ARM64" ] | 108       defines += [ "TARGET_ARCH_ARM64" ] | 
| 97     } else if (dart_target_arch == "mips") { | 109     } else if (dart_target_arch == "mips") { | 
| 98       defines += [ "TARGET_ARCH_MIPS" ] | 110       defines += [ "TARGET_ARCH_MIPS" ] | 
| 99     } else if (dart_target_arch == "x64") { | 111     } else if (dart_target_arch == "x64") { | 
| 100       defines += [ "TARGET_ARCH_X64" ] | 112       defines += [ "TARGET_ARCH_X64" ] | 
| 101     } else if (dart_target_arch == "ia32") { | 113     } else if (dart_target_arch == "ia32") { | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 206     "vm:libdart_lib_nosnapshot", | 218     "vm:libdart_lib_nosnapshot", | 
| 207     "vm:libdart_lib", | 219     "vm:libdart_lib", | 
| 208     "vm:libdart_vm", | 220     "vm:libdart_vm", | 
| 209     "vm:libdart_platform", | 221     "vm:libdart_platform", | 
| 210     "third_party/double-conversion/src:libdouble_conversion", | 222     "third_party/double-conversion/src:libdouble_conversion", | 
| 211   ] | 223   ] | 
| 212   sources = [ | 224   sources = [ | 
| 213     "vm/libdart_dependency_helper.cc", | 225     "vm/libdart_dependency_helper.cc", | 
| 214   ] | 226   ] | 
| 215 } | 227 } | 
| OLD | NEW | 
|---|