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 |
| 15 # Explicitly set the target architecture in case of precompilation. Leaving |
| 16 # this unspecified results in automatic target architecture detection. |
| 17 # Available options are: arm, arm64, mips, x64 and ia32 |
| 18 dart_target_arch = "" |
14 } | 19 } |
15 | 20 |
16 config("dart_public_config") { | 21 config("dart_public_config") { |
17 include_dirs = [ | 22 include_dirs = [ |
18 ".", | 23 ".", |
19 ] | 24 ] |
20 } | 25 } |
21 | 26 |
22 config("dart_config") { | 27 config("dart_config") { |
23 defines = [] | 28 defines = [] |
| 29 |
| 30 if (dart_target_arch != "") { |
| 31 if (dart_target_arch == "arm") { |
| 32 defines += [ "TARGET_ARCH_ARM" ] |
| 33 } else if (dart_target_arch == "arm64") { |
| 34 defines += [ "TARGET_ARCH_ARM64" ] |
| 35 } else if (dart_target_arch == "mips") { |
| 36 defines += [ "TARGET_ARCH_MIPS" ] |
| 37 } else if (dart_target_arch == "x64") { |
| 38 defines += [ "TARGET_ARCH_X64" ] |
| 39 } else if (dart_target_arch == "ia32") { |
| 40 defines += [ "TARGET_ARCH_IA32" ] |
| 41 } else { |
| 42 print("Invalid |dart_target_arch|") |
| 43 assert(false) |
| 44 } |
| 45 } |
| 46 |
24 if (dart_debug) { | 47 if (dart_debug) { |
25 defines += ["DEBUG"] | 48 defines += ["DEBUG"] |
26 } else { | 49 } else { |
27 defines += ["NDEBUG"] | 50 defines += ["NDEBUG"] |
28 } | 51 } |
29 | 52 |
30 cflags = [ | 53 cflags = [ |
31 "-Werror", | 54 "-Werror", |
32 "-Wall", | 55 "-Wall", |
33 "-Wextra", # Also known as -W. | 56 "-Wextra", # Also known as -W. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 "vm:libdart_lib_nosnapshot", | 144 "vm:libdart_lib_nosnapshot", |
122 "vm:libdart_lib", | 145 "vm:libdart_lib", |
123 "vm:libdart_vm", | 146 "vm:libdart_vm", |
124 "vm:libdart_platform", | 147 "vm:libdart_platform", |
125 "third_party/double-conversion/src:libdouble_conversion", | 148 "third_party/double-conversion/src:libdouble_conversion", |
126 ] | 149 ] |
127 sources = [ | 150 sources = [ |
128 "vm/libdart_dependency_helper.cc", | 151 "vm/libdart_dependency_helper.cc", |
129 ] | 152 ] |
130 } | 153 } |
OLD | NEW |