Chromium Code Reviews| 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 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 # Controls DART_PRECOMPILER #define. | 86 # Controls DART_PRECOMPILER #define. |
| 87 config("dart_precompiler_config") { | 87 config("dart_precompiler_config") { |
| 88 defines = [] | 88 defines = [] |
| 89 defines += ["DART_PRECOMPILER"] | 89 defines += ["DART_PRECOMPILER"] |
| 90 } | 90 } |
| 91 | 91 |
| 92 config("dart_no_snapshot_config") { | |
| 93 defines = [] | |
| 94 defines += ["DART_NO_SNAPSHOT"] | |
| 95 } | |
| 96 | |
| 92 config("dart_config") { | 97 config("dart_config") { |
| 93 defines = [] | 98 defines = [] |
| 94 | 99 |
| 95 if (dart_experimental_interpreter) { | 100 if (dart_experimental_interpreter) { |
| 96 dart_target_arch = "dbc" | 101 dart_target_arch = "dbc" |
| 97 } | 102 } |
| 98 | 103 |
| 99 if (dart_target_arch != "") { | 104 if (dart_target_arch != "") { |
| 100 if (dart_target_arch == "arm") { | 105 if ((dart_target_arch == "arm") || |
| 106 (dart_target_arch == "simarm")) { | |
| 101 defines += [ "TARGET_ARCH_ARM" ] | 107 defines += [ "TARGET_ARCH_ARM" ] |
| 102 if (target_os == "mac" || target_os == "ios") { | 108 if (target_os == "mac" || target_os == "ios") { |
| 103 defines += [ "TARGET_ABI_IOS" ] | 109 defines += [ "TARGET_ABI_IOS" ] |
| 104 } else { | 110 } else { |
| 105 defines += [ "TARGET_ABI_EABI" ] | 111 defines += [ "TARGET_ABI_EABI" ] |
| 106 } | 112 } |
| 107 } else if (dart_target_arch == "arm64") { | 113 } else if ((dart_target_arch == "armv6") || |
| 114 (dart_target_arch == "simarmv6")) { | |
| 115 defines += [ "TARGET_ARCH_ARM" ] | |
| 116 defines += [ "TARGET_ARCH_ARM_6" ] | |
| 117 defines += [ "TARGET_ABI_EABI" ] | |
| 118 } else if ((dart_target_arch == "armv5te") || | |
| 119 (dart_target_arch == "simarmv5te")) { | |
| 120 defines += [ "TARGET_ARCH_ARM" ] | |
| 121 defines += [ "TARGET_ARCH_ARM_5TE" ] | |
| 122 defines += [ "TARGET_ABI_EABI" ] | |
| 123 } else if ((dart_target_arch == "arm64") || | |
| 124 (dart_target_arch == "simarm64")) { | |
| 108 defines += [ "TARGET_ARCH_ARM64" ] | 125 defines += [ "TARGET_ARCH_ARM64" ] |
| 109 } else if (dart_target_arch == "mips") { | 126 } else if ((dart_target_arch == "mips") || |
| 127 (dart_target_arch == "simmips")) { | |
| 110 defines += [ "TARGET_ARCH_MIPS" ] | 128 defines += [ "TARGET_ARCH_MIPS" ] |
| 111 } else if (dart_target_arch == "x64") { | 129 } else if (dart_target_arch == "x64") { |
| 112 defines += [ "TARGET_ARCH_X64" ] | 130 defines += [ "TARGET_ARCH_X64" ] |
| 113 } else if (dart_target_arch == "ia32") { | 131 } else if (dart_target_arch == "ia32") { |
| 114 defines += [ "TARGET_ARCH_IA32" ] | 132 defines += [ "TARGET_ARCH_IA32" ] |
| 115 } else if (dart_target_arch == "dbc") { | 133 } else if ((dart_target_arch == "dbc") || |
| 134 (dart_target_arch == "simdbc") || | |
| 135 (dart_target_arch == "simdbc64")) { | |
| 116 defines += [ "TARGET_ARCH_DBC" ] | 136 defines += [ "TARGET_ARCH_DBC" ] |
| 137 defines += [ "USING_SIMULATOR" ] | |
| 117 } else { | 138 } else { |
| 118 print("Invalid |dart_target_arch|") | 139 print("Invalid |dart_target_arch|") |
| 119 assert(false) | 140 assert(false) |
| 120 } | 141 } |
| 121 } | 142 } |
| 122 | 143 |
| 123 if (dart_debug) { | 144 if (dart_debug) { |
| 124 defines += ["DEBUG"] | 145 defines += ["DEBUG"] |
| 125 } else { | 146 } else { |
| 126 defines += ["NDEBUG"] | 147 defines += ["NDEBUG"] |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 152 } | 173 } |
| 153 | 174 |
| 154 if (defined(is_asan) && is_asan) { | 175 if (defined(is_asan) && is_asan) { |
| 155 ldflags = [ | 176 ldflags = [ |
| 156 "-Wl,-u_sanitizer_options_link_helper", | 177 "-Wl,-u_sanitizer_options_link_helper", |
| 157 "-fsanitize=address", | 178 "-fsanitize=address", |
| 158 ] | 179 ] |
| 159 } | 180 } |
| 160 } | 181 } |
| 161 | 182 |
| 162 static_library("libdart") { | 183 static_library("libdart") { |
|
Cutch
2016/09/21 23:26:27
"libdart" and "libdart_precompiled_runtime" can be
zra
2016/09/22 06:08:17
Done.
| |
| 163 configs += [":dart_config", | 184 configs += [":dart_config", |
| 164 ":dart_product_config", | 185 ":dart_product_config"] |
| 165 ":dart_precompiled_runtime_config"] | |
| 166 deps = [ | 186 deps = [ |
| 167 "vm:libdart_lib", | 187 "vm:libdart_lib", |
| 168 "vm:libdart_vm", | 188 "vm:libdart_vm", |
| 169 "third_party/double-conversion/src:libdouble_conversion", | 189 "third_party/double-conversion/src:libdouble_conversion", |
| 170 ":generate_version_cc_file", | 190 ":generate_version_cc_file", |
| 171 ] | 191 ] |
| 172 include_dirs = [ | 192 include_dirs = [ |
| 173 ".", | 193 ".", |
| 174 ] | 194 ] |
| 175 public_configs = [":dart_public_config"] | 195 public_configs = [":dart_public_config"] |
| 176 sources = [ | 196 sources = [ |
| 177 "include/dart_api.h", | 197 "include/dart_api.h", |
| 178 "include/dart_mirrors_api.h", | 198 "include/dart_mirrors_api.h", |
| 179 "include/dart_native_api.h", | 199 "include/dart_native_api.h", |
| 180 "include/dart_tools_api.h", | 200 "include/dart_tools_api.h", |
| 181 "vm/dart_api_impl.cc", | 201 "vm/dart_api_impl.cc", |
| 182 "vm/debugger_api_impl.cc", | 202 "vm/debugger_api_impl.cc", |
| 183 "vm/mirrors_api_impl.cc", | 203 "vm/mirrors_api_impl.cc", |
| 184 "vm/native_api_impl.cc", | 204 "vm/native_api_impl.cc", |
| 185 "vm/version.h", | 205 "vm/version.h", |
| 186 "$target_gen_dir/version.cc", | 206 "$target_gen_dir/version.cc", |
| 187 ] | 207 ] |
| 188 } | 208 } |
| 189 | 209 |
| 210 static_library("libdart_precompiled_runtime") { | |
| 211 configs += [":dart_config", | |
| 212 ":dart_product_config", | |
| 213 ":dart_precompiled_runtime_config"] | |
| 214 deps = [ | |
| 215 "vm:libdart_lib_precompiled_runtime", | |
| 216 "vm:libdart_vm_precompiled_runtime", | |
| 217 "third_party/double-conversion/src:libdouble_conversion", | |
| 218 ":generate_version_cc_file", | |
| 219 ] | |
| 220 include_dirs = [ | |
| 221 ".", | |
| 222 ] | |
| 223 public_configs = [":dart_public_config"] | |
| 224 sources = [ | |
| 225 "include/dart_api.h", | |
| 226 "include/dart_mirrors_api.h", | |
| 227 "include/dart_native_api.h", | |
| 228 "include/dart_tools_api.h", | |
| 229 "vm/dart_api_impl.cc", | |
| 230 "vm/debugger_api_impl.cc", | |
| 231 "vm/mirrors_api_impl.cc", | |
| 232 "vm/native_api_impl.cc", | |
| 233 "vm/version.h", | |
| 234 "$target_gen_dir/version.cc", | |
| 235 ] | |
| 236 } | |
| 237 | |
| 190 action("generate_version_cc_file") { | 238 action("generate_version_cc_file") { |
| 191 deps = [ | 239 deps = [ |
| 192 ":libdart_dependency_helper", | 240 ":libdart_dependency_helper", |
| 193 ] | 241 ] |
| 194 inputs = [ | 242 inputs = [ |
| 195 "../tools/utils.py", | 243 "../tools/utils.py", |
| 196 "../tools/print_version.py", | 244 "../tools/print_version.py", |
| 197 "../tools/VERSION", | 245 "../tools/VERSION", |
| 198 "vm/version_in.cc", | 246 "vm/version_in.cc", |
| 199 ] | 247 ] |
| 200 output = "$target_gen_dir/version.cc" | 248 output = "$target_gen_dir/version.cc" |
| 201 outputs = [ output, ] | 249 outputs = [ output, ] |
| 202 | 250 |
| 203 script = "../tools/make_version.py" | 251 script = "../tools/make_version.py" |
| 204 args = [ | 252 args = [ |
| 205 "--quiet", | 253 "--quiet", |
| 206 "--output", rebase_path(output, root_build_dir), | 254 "--output", rebase_path(output, root_build_dir), |
| 207 "--input", rebase_path("vm/version_in.cc", root_build_dir), | 255 "--input", rebase_path("vm/version_in.cc", root_build_dir), |
| 208 ] | 256 ] |
| 209 } | 257 } |
| 210 | 258 |
| 211 | 259 |
| 212 executable("libdart_dependency_helper") { | 260 executable("libdart_dependency_helper") { |
| 213 configs += [":dart_config", | 261 configs += [":dart_config", |
| 214 ":dart_product_config", | 262 ":dart_product_config"] |
| 215 ":dart_precompiled_runtime_config"] | |
| 216 deps = [ | 263 deps = [ |
| 217 "vm:libdart_lib_nosnapshot", | 264 "vm:libdart_lib_nosnapshot", |
| 218 "vm:libdart_lib", | 265 "vm:libdart_lib", |
| 219 "vm:libdart_vm", | 266 "vm:libdart_vm", |
| 220 "vm:libdart_platform", | 267 "vm:libdart_platform", |
| 221 "third_party/double-conversion/src:libdouble_conversion", | 268 "third_party/double-conversion/src:libdouble_conversion", |
| 222 ] | 269 ] |
| 223 sources = [ | 270 sources = [ |
| 224 "vm/libdart_dependency_helper.cc", | 271 "vm/libdart_dependency_helper.cc", |
| 225 ] | 272 ] |
| 226 } | 273 } |
| OLD | NEW |