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 declare_args() { | |
| 6 dart_io_include_root_certs = false | |
| 7 | |
| 8 dart_zlib_path = "//third_party/zlib" | |
| 9 | |
| 10 dart_include_observatory = false | |
| 11 } | |
| 12 | |
| 13 | |
| 5 resources_sources_gypi = | 14 resources_sources_gypi = |
| 6 exec_script("../../tools/gypi_to_gn.py", | 15 exec_script("../../tools/gypi_to_gn.py", |
| 7 [rebase_path("vmservice/vmservice_sources.gypi")], | 16 [rebase_path("vmservice/vmservice_sources.gypi")], |
| 8 "scope", | 17 "scope", |
| 9 ["vmservice/vmservice_sources.gypi"]) | 18 ["vmservice/vmservice_sources.gypi"]) |
| 10 | 19 |
| 11 # Generate a resources.cc file for the service isolate without Observatory. | 20 # Generate a resources.cc file for the service isolate without Observatory. |
| 12 action("gen_resources_cc") { | 21 action("gen_resources_cc") { |
| 13 visibility = [ ":*" ] # Only targets in this file can see this. | 22 visibility = [ ":*" ] # Only targets in this file can see this. |
| 14 script = "../tools/create_resources.py" | 23 script = "../tools/create_resources.py" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 38 action(target_name) { | 47 action(target_name) { |
| 39 visibility = [ ":*" ] # Only targets in this file can see this. | 48 visibility = [ ":*" ] # Only targets in this file can see this. |
| 40 script = "../tools/gen_library_src_paths.py" | 49 script = "../tools/gen_library_src_paths.py" |
| 41 inputs = [ | 50 inputs = [ |
| 42 "../tools/gen_library_src_paths.py", | 51 "../tools/gen_library_src_paths.py", |
| 43 "builtin_in.cc", | 52 "builtin_in.cc", |
| 44 ] + invoker.sources | 53 ] + invoker.sources |
| 45 outputs = [ invoker.output, ] | 54 outputs = [ invoker.output, ] |
| 46 name = invoker.name | 55 name = invoker.name |
| 47 kind = invoker.kind | 56 kind = invoker.kind |
| 57 library_name = "dart:${name}" | |
| 58 if (defined(invoker.library_name)) { | |
| 59 library_name = invoker.library_name | |
| 60 } | |
| 48 args = [ | 61 args = [ |
| 49 "--output", rebase_path(invoker.output, root_build_dir), | 62 "--output", rebase_path(invoker.output, root_build_dir), |
| 50 "--input_cc", rebase_path("builtin_in.cc", root_build_dir), | 63 "--input_cc", rebase_path("builtin_in.cc", root_build_dir), |
| 51 "--include", "bin/builtin.h", | 64 "--include", "bin/builtin.h", |
| 52 "--var_name", "dart::bin::Builtin::${name}_${kind}_paths_", | 65 "--var_name", "dart::bin::Builtin::${name}_${kind}_paths_", |
| 53 "--library_name", "dart:${name}",] + | 66 "--library_name", library_name,] + |
| 54 rebase_path(invoker.sources, root_build_dir) | 67 rebase_path(invoker.sources, root_build_dir) |
| 55 } | 68 } |
| 56 } | 69 } |
| 57 | 70 |
| 58 | 71 |
| 59 builtin_sources_gypi = | 72 builtin_sources_gypi = |
| 60 exec_script("../../tools/gypi_to_gn.py", | 73 exec_script("../../tools/gypi_to_gn.py", |
| 61 [rebase_path("builtin_sources.gypi")], | 74 [rebase_path("builtin_sources.gypi")], |
| 62 "scope", | 75 "scope", |
| 63 ["builtin_sources.gypi"]) | 76 ["builtin_sources.gypi"]) |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 92 ["io_sources.gypi"]) | 105 ["io_sources.gypi"]) |
| 93 | 106 |
| 94 gen_library_src_path("generate_io_patch_cc_file") { | 107 gen_library_src_path("generate_io_patch_cc_file") { |
| 95 name = "io" | 108 name = "io" |
| 96 kind = "patch" | 109 kind = "patch" |
| 97 sources = io_sources_gypi.sources | 110 sources = io_sources_gypi.sources |
| 98 output = "$target_gen_dir/io_patch_gen.cc" | 111 output = "$target_gen_dir/io_patch_gen.cc" |
| 99 } | 112 } |
| 100 | 113 |
| 101 | 114 |
| 115 gen_library_src_path("generate_html_cc_file") { | |
| 116 name = "html" | |
| 117 kind = "source" | |
| 118 sources = ["../../sdk/lib/html/dartium/html_dartium.dart"] | |
| 119 output = "$target_gen_dir/html_gen.cc" | |
| 120 } | |
| 121 | |
| 122 gen_library_src_path("generate_html_common_cc_file") { | |
| 123 name = "html_common" | |
| 124 kind = "source" | |
| 125 sources = [ | |
| 126 "../../sdk/lib/html/html_common/html_common.dart", | |
| 127 "../../sdk/lib/html/html_common/css_class_set.dart", | |
| 128 "../../sdk/lib/html/html_common/device.dart", | |
| 129 "../../sdk/lib/html/html_common/filtered_element_list.dart", | |
| 130 "../../sdk/lib/html/html_common/lists.dart", | |
| 131 "../../sdk/lib/html/html_common/conversions.dart", | |
| 132 "../../sdk/lib/html/html_common/conversions_dartium.dart", | |
| 133 ] | |
| 134 output = "$target_gen_dir/html_common_gen.cc" | |
| 135 } | |
| 136 | |
| 137 gen_library_src_path("generate_js_cc_file") { | |
| 138 name = "js" | |
| 139 kind = "source" | |
| 140 sources = ["../../sdk/lib/js/dartium/js_dartium.dart"] | |
| 141 output = "$target_gen_dir/js_gen.cc" | |
| 142 } | |
| 143 | |
| 144 gen_library_src_path("generate_blink_cc_file") { | |
| 145 name = "_blink" | |
| 146 kind = "source" | |
| 147 sources = ["../../sdk/lib/_blink/dartium/_blink_dartium.dart"] | |
| 148 output = "$target_gen_dir/blink_gen.cc" | |
| 149 } | |
| 150 | |
| 151 gen_library_src_path("generate_indexed_db_cc_file") { | |
| 152 name = "indexed_db" | |
| 153 kind = "source" | |
| 154 sources = ["../../sdk/lib/indexed_db/dartium/indexed_db_dartium.dart"] | |
| 155 output = "$target_gen_dir/indexed_db_gen.cc" | |
| 156 } | |
| 157 | |
| 158 gen_library_src_path("generate_cached_patches_cc_file") { | |
| 159 name = "cached_patches" | |
| 160 library_name = "cached_patches.dart" | |
| 161 kind = "sources" | |
| 162 sources = ["../../sdk/lib/js/dartium/cached_patches.dart"] | |
| 163 output = "$target_gen_dir/cached_patches_gen.cc" | |
| 164 } | |
| 165 | |
| 166 gen_library_src_path("generate_web_gl_cc_file") { | |
| 167 name = "web_gl" | |
| 168 kind = "source" | |
| 169 sources = ["../../sdk/lib/web_gl/dartium/web_gl_dartium.dart"] | |
| 170 output = "$target_gen_dir/web_gl_gen.cc" | |
| 171 } | |
| 172 | |
| 173 gen_library_src_path("generate_metadata_cc_file") { | |
| 174 name = "metadata" | |
| 175 library_name = "metadata.dart" | |
| 176 kind = "source" | |
| 177 sources = ["../../sdk/lib/html/html_common/metadata.dart"] | |
| 178 output = "$target_gen_dir/metadata_gen.cc" | |
| 179 } | |
| 180 | |
| 181 gen_library_src_path("generate_web_sql_cc_file") { | |
| 182 name = "web_sql" | |
| 183 kind = "source" | |
| 184 sources = ["../../sdk/lib/web_sql/dartium/web_sql_dartium.dart"] | |
| 185 output = "$target_gen_dir/web_sql_gen.cc" | |
| 186 } | |
| 187 | |
| 188 gen_library_src_path("generate_svg_cc_file") { | |
| 189 name = "svg" | |
| 190 kind = "source" | |
| 191 sources = ["../../sdk/lib/svg/dartium/svg_dartium.dart"] | |
| 192 output = "$target_gen_dir/svg_gen.cc" | |
| 193 } | |
| 194 | |
| 195 gen_library_src_path("generate_web_audio_cc_file") { | |
| 196 name = "web_audio" | |
| 197 kind = "source" | |
| 198 sources = ["../../sdk/lib/web_audio/dartium/web_audio_dartium.dart"] | |
| 199 output = "$target_gen_dir/web_audio_gen.cc" | |
| 200 } | |
| 201 | |
| 102 config("libdart_builtin_config") { | 202 config("libdart_builtin_config") { |
| 103 libs = [ | 203 libs = [ |
| 104 "dl", | 204 "dl", |
| 105 ] | 205 ] |
| 206 if (is_android) { | |
| 207 libs += [ | |
| 208 "android", | |
| 209 "log", | |
| 210 ] | |
| 211 } | |
| 106 } | 212 } |
| 107 | 213 |
| 108 | 214 |
| 109 builtin_impl_sources_gypi = | 215 builtin_impl_sources_gypi = |
| 110 exec_script("../../tools/gypi_to_gn.py", | 216 exec_script("../../tools/gypi_to_gn.py", |
| 111 [rebase_path("builtin_impl_sources.gypi")], | 217 [rebase_path("builtin_impl_sources.gypi")], |
| 112 "scope", | 218 "scope", |
| 113 ["builtin_impl_sources.gypi"]) | 219 ["builtin_impl_sources.gypi"]) |
| 114 | 220 |
| 115 static_library("libdart_builtin") { | 221 static_library("libdart_builtin") { |
| 116 configs += ["..:dart_config", "..:dart_product_config"] | 222 configs += ["..:dart_config", "..:dart_product_config"] |
| 117 public_configs = [":libdart_builtin_config"] | 223 public_configs = [":libdart_builtin_config"] |
| 118 deps = [ | 224 deps = [ |
| 119 ":generate_builtin_cc_file", | 225 ":generate_builtin_cc_file", |
| 120 ":generate_io_cc_file", | 226 ":generate_io_cc_file", |
| 121 ":generate_io_patch_cc_file", | 227 ":generate_io_patch_cc_file", |
| 228 ":generate_html_cc_file", | |
| 229 ":generate_html_common_cc_file", | |
| 230 ":generate_js_cc_file", | |
| 231 ":generate_blink_cc_file", | |
| 232 ":generate_indexed_db_cc_file", | |
| 233 ":generate_cached_patches_cc_file", | |
| 234 ":generate_web_gl_cc_file", | |
| 235 ":generate_metadata_cc_file", | |
| 236 ":generate_web_sql_cc_file", | |
| 237 ":generate_svg_cc_file", | |
| 238 ":generate_web_audio_cc_file", | |
| 122 ] | 239 ] |
| 123 include_dirs = [ | 240 include_dirs = [ |
| 124 "..", | 241 "..", |
| 125 ] | 242 ] |
| 126 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) | 243 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
| 127 sources = [ | 244 sources = [ |
| 128 "log_android.cc", | 245 "log_android.cc", |
| 129 "log_fuchsia.cc", | 246 "log_fuchsia.cc", |
| 130 "log_linux.cc", | 247 "log_linux.cc", |
| 131 "log_macos.cc", | 248 "log_macos.cc", |
| 132 "log_win.cc", | 249 "log_win.cc", |
| 133 ] + builtin_impl_sources_gypi.sources | 250 ] + builtin_impl_sources_gypi.sources |
| 134 } | 251 } |
| 135 | 252 |
| 136 | 253 |
| 137 static_library("libdart_nosnapshot") { | 254 static_library("libdart_nosnapshot") { |
|
Cutch
2016/09/21 23:26:27
same comment here about a template to avoid the du
zra
2016/09/22 06:08:17
Done.
| |
| 138 configs += ["..:dart_config", | 255 configs += ["..:dart_config", |
| 139 "..:dart_product_config", | 256 "..:dart_product_config"] |
| 140 "..:dart_precompiled_runtime_config"] | |
| 141 deps = [ | 257 deps = [ |
| 142 "../vm:libdart_lib_nosnapshot", | 258 "../vm:libdart_lib_nosnapshot", |
| 143 "../vm:libdart_vm_nosnapshot", | 259 "../vm:libdart_vm_nosnapshot", |
| 144 "../vm:libdart_platform", | 260 "../vm:libdart_platform", |
| 145 "../third_party/double-conversion/src:libdouble_conversion", | 261 "../third_party/double-conversion/src:libdouble_conversion", |
| 146 "..:generate_version_cc_file", | 262 "..:generate_version_cc_file", |
| 263 ] | |
| 264 | |
| 265 sources = [ | |
| 266 "../include/dart_api.h", | |
| 267 "../include/dart_mirrors_api.h", | |
| 268 "../include/dart_native_api.h", | |
| 269 "../include/dart_tools_api.h", | |
| 270 "../vm/dart_api_impl.cc", | |
| 271 "../vm/debugger_api_impl.cc", | |
| 272 "../vm/mirrors_api_impl.cc", | |
| 273 "../vm/native_api_impl.cc", | |
| 274 "$target_gen_dir/../version.cc", | |
| 275 ] | |
| 276 | |
| 277 include_dirs = [ | |
| 278 "..", | |
| 279 ] | |
| 280 | |
| 281 defines = [ | |
| 282 "DART_SHARED_LIB", | |
| 283 ] | |
| 284 } | |
| 285 | |
| 286 | |
| 287 static_library("libdart_nosnapshot_precompiled_runtime") { | |
| 288 configs += ["..:dart_config", | |
| 289 "..:dart_product_config", | |
| 290 "..:dart_precompiled_runtime_config"] | |
| 291 deps = [ | |
| 292 "../vm:libdart_lib_nosnapshot", | |
| 293 "../vm:libdart_vm_nosnapshot_precompiled_runtime", | |
| 294 "../vm:libdart_platform", | |
| 295 "../third_party/double-conversion/src:libdouble_conversion", | |
| 296 "..:generate_version_cc_file", | |
| 147 ] | 297 ] |
| 148 | 298 |
| 149 sources = [ | 299 sources = [ |
| 150 "../include/dart_api.h", | 300 "../include/dart_api.h", |
| 151 "../include/dart_mirrors_api.h", | 301 "../include/dart_mirrors_api.h", |
| 152 "../include/dart_native_api.h", | 302 "../include/dart_native_api.h", |
| 153 "../include/dart_tools_api.h", | 303 "../include/dart_tools_api.h", |
| 154 "../vm/dart_api_impl.cc", | 304 "../vm/dart_api_impl.cc", |
| 155 "../vm/debugger_api_impl.cc", | 305 "../vm/debugger_api_impl.cc", |
| 156 "../vm/mirrors_api_impl.cc", | 306 "../vm/mirrors_api_impl.cc", |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 } | 401 } |
| 252 | 402 |
| 253 # A source set for the implementation of 'dart:io' library | 403 # A source set for the implementation of 'dart:io' library |
| 254 # (without secure sockets) suitable for linking with gen_snapshot. | 404 # (without secure sockets) suitable for linking with gen_snapshot. |
| 255 source_set("gen_snapshot_dart_io") { | 405 source_set("gen_snapshot_dart_io") { |
| 256 configs += ["..:dart_config", | 406 configs += ["..:dart_config", |
| 257 "..:dart_product_config", | 407 "..:dart_product_config", |
| 258 "..:dart_precompiler_config"] | 408 "..:dart_precompiler_config"] |
| 259 | 409 |
| 260 deps = [ | 410 deps = [ |
| 261 "//third_party/zlib", | 411 "$dart_zlib_path", |
| 262 ] | 412 ] |
| 263 | 413 |
| 264 custom_sources_filter = [ | 414 custom_sources_filter = [ |
| 265 "*_test.cc", | 415 "*_test.cc", |
| 266 "*_test.h", | 416 "*_test.h", |
| 267 "builtin.cc", | 417 "builtin.cc", |
| 268 "builtin_common.cc", | 418 "builtin_common.cc", |
| 269 "builtin_gen_snapshot.cc", | 419 "builtin_gen_snapshot.cc", |
| 270 ] | 420 ] |
| 271 if (!is_mac && !is_ios) { | 421 if (!is_mac && !is_ios) { |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 286 ] | 436 ] |
| 287 | 437 |
| 288 include_dirs = [ | 438 include_dirs = [ |
| 289 "..", | 439 "..", |
| 290 "//third_party" | 440 "//third_party" |
| 291 ] | 441 ] |
| 292 } | 442 } |
| 293 | 443 |
| 294 source_set("libdart_embedder_noio") { | 444 source_set("libdart_embedder_noio") { |
| 295 configs += ["..:dart_config", | 445 configs += ["..:dart_config", |
| 296 "..:dart_product_config", | 446 "..:dart_product_config"] |
| 297 "..:dart_precompiled_runtime_config"] | |
| 298 deps = [ | 447 deps = [ |
| 299 "..:libdart", | 448 "..:libdart", |
| 300 "../vm:libdart_platform", | 449 "../vm:libdart_platform", |
| 301 ] | 450 ] |
| 302 } | 451 } |
| 303 | 452 |
| 453 # add argument set to false for including root_certificates.cc | |
| 304 | 454 |
| 305 # A source set for the implementation of 'dart:io' library | 455 |
| 306 # (without secure sockets). | 456 # A source set for the implementation of 'dart:io' library. |
| 307 source_set("embedded_dart_io") { | 457 source_set("embedded_dart_io") { |
| 308 configs += ["..:dart_config", | 458 configs += ["..:dart_config", |
| 309 "..:dart_product_config", | 459 "..:dart_product_config"] |
| 310 "..:dart_precompiled_runtime_config"] | |
| 311 | |
| 312 custom_sources_filter = [ | 460 custom_sources_filter = [ |
| 313 "*_test.cc", | 461 "*_test.cc", |
| 314 "*_test.h", | 462 "*_test.h", |
| 315 "builtin.cc", | 463 "builtin.cc", |
| 316 "builtin_gen_snapshot.cc", | 464 "builtin_gen_snapshot.cc", |
| 317 ] | 465 ] |
| 318 if (!is_mac && !is_ios) { | 466 if (!is_mac && !is_ios) { |
| 319 # Dart tree uses *_macos.* instead of *_mac.* | 467 # Dart tree uses *_macos.* instead of *_mac.* |
| 320 custom_sources_filter += [ | 468 custom_sources_filter += [ |
| 321 "*_macos.h", | 469 "*_macos.h", |
| 322 "*_macos.cc", | 470 "*_macos.cc", |
| 323 ] | 471 ] |
| 324 } | 472 } |
| 325 set_sources_assignment_filter(custom_sources_filter) | 473 set_sources_assignment_filter(custom_sources_filter) |
| 326 | 474 |
| 475 defines = [] | |
| 327 if (is_mac || is_ios) { | 476 if (is_mac || is_ios) { |
| 328 libs = [ | 477 libs = [ |
| 329 "Security.framework", | 478 "Security.framework", |
| 330 ] | 479 ] |
| 331 } else if (defined(is_fuchsia) && is_fuchsia) { | 480 } else if (defined(is_fuchsia) && is_fuchsia) { |
| 332 defines = [ | 481 defines = [ |
|
Cutch
2016/09/21 23:26:27
just for consistency here:
defines += ...
zra
2016/09/22 06:08:17
Done.
| |
| 333 "DART_IO_SECURE_SOCKET_DISABLED" | 482 "DART_IO_SECURE_SOCKET_DISABLED" |
| 334 ] | 483 ] |
| 335 } else { | 484 } else { |
| 336 deps = [ | 485 deps = [ |
| 337 "//third_party/boringssl", | 486 "//third_party/boringssl", |
| 338 ] | 487 ] |
| 339 } | 488 } |
| 340 | 489 |
| 341 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources | 490 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources |
| 342 sources += [ | 491 sources += [ |
| 343 "builtin_nolib.cc", | 492 "builtin_nolib.cc", |
| 344 "builtin_natives.cc", | 493 "builtin_natives.cc", |
| 345 "io_natives.cc", | 494 "io_natives.cc", |
| 346 "io_natives.h", | 495 "io_natives.h", |
| 347 "embedded_dart_io.cc", | 496 "embedded_dart_io.cc", |
| 348 "embedded_dart_io.h", | 497 "embedded_dart_io.h", |
| 349 "log_android.cc", | 498 "log_android.cc", |
| 350 "log_linux.cc", | 499 "log_linux.cc", |
| 351 "log_macos.cc", | 500 "log_macos.cc", |
| 352 "log_win.cc", | 501 "log_win.cc", |
| 353 "log.h", | 502 "log.h", |
| 354 ] | 503 ] |
| 504 | |
| 355 if (is_linux) { | 505 if (is_linux) { |
| 356 sources += [ "../../third_party/root_certificates/root_certificates.cc"] | 506 if (dart_io_include_root_certs) { |
| 507 sources += [ "../../third_party/root_certificates/root_certificates.cc"] | |
| 508 } else { | |
| 509 defines += [ | |
| 510 "DART_IO_ROOT_CERTS_DISABLED", | |
| 511 ] | |
| 512 } | |
| 357 } | 513 } |
| 358 | 514 |
| 359 include_dirs = [ | 515 include_dirs = [ |
| 360 "..", | 516 "..", |
| 361 "//third_party" | 517 "//third_party" |
| 362 ] | 518 ] |
| 363 } | 519 } |
| 364 | 520 |
| 365 | 521 |
| 366 action("generate_snapshot_bin") { | 522 action("generate_snapshot_bin") { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 source_set("dart_snapshot_cc") { | 586 source_set("dart_snapshot_cc") { |
| 431 sources = [ | 587 sources = [ |
| 432 "$root_gen_dir/dart_snapshot.cc", | 588 "$root_gen_dir/dart_snapshot.cc", |
| 433 ] | 589 ] |
| 434 | 590 |
| 435 deps = [ | 591 deps = [ |
| 436 ":generate_snapshot_file", | 592 ":generate_snapshot_file", |
| 437 ] | 593 ] |
| 438 } | 594 } |
| 439 | 595 |
| 596 | |
| 597 executable("dart") { | |
| 598 configs += ["..:dart_config", | |
| 599 "..:dart_product_config"] | |
| 600 deps = [ | |
| 601 ":gen_resources_cc", | |
| 602 ":embedded_dart_io", | |
| 603 ":libdart_builtin", | |
| 604 "../vm:libdart_platform", | |
| 605 "..:libdart", | |
| 606 ":dart_snapshot_cc", | |
| 607 "$dart_zlib_path", | |
| 608 ] | |
| 609 | |
| 610 sources = [ | |
| 611 "main.cc", | |
| 612 "vmservice_impl.cc", | |
| 613 "vmservice_impl.h", | |
| 614 "$target_gen_dir/resources_gen.cc", | |
| 615 ] | |
| 616 | |
| 617 if (!dart_include_observatory) { | |
| 618 defines = [ | |
| 619 "NO_OBSERVATORY", | |
| 620 ] | |
| 621 sources += [ | |
| 622 "observatory_assets_empty.cc", | |
| 623 ] | |
| 624 } else { | |
| 625 deps += [ | |
| 626 "../observatory:standalone_observatory_archive", | |
| 627 ] | |
| 628 } | |
| 629 | |
| 630 include_dirs = [ | |
| 631 "..", | |
| 632 "//third_party", | |
| 633 ] | |
| 634 | |
| 635 ldflags = [ | |
| 636 "-rdynamic", | |
| 637 ] | |
| 638 } | |
| 639 | |
| 640 executable("dart_precompiled_runtime") { | |
|
Cutch
2016/09/21 23:26:27
This is identical to the executable "dart' above.
zra
2016/09/22 06:08:17
Done.
| |
| 641 configs += ["..:dart_config", | |
| 642 "..:dart_product_config"] | |
| 643 deps = [ | |
| 644 ":gen_resources_cc", | |
| 645 ":embedded_dart_io", | |
| 646 ":libdart_builtin", | |
| 647 "../vm:libdart_platform", | |
| 648 "..:libdart", | |
| 649 ":dart_snapshot_cc", | |
| 650 "$dart_zlib_path", | |
| 651 ] | |
| 652 | |
| 653 sources = [ | |
| 654 "main.cc", | |
| 655 "vmservice_impl.cc", | |
| 656 "vmservice_impl.h", | |
| 657 "$target_gen_dir/resources_gen.cc", | |
| 658 ] | |
| 659 | |
| 660 if (!dart_include_observatory) { | |
| 661 defines = [ | |
| 662 "NO_OBSERVATORY", | |
| 663 ] | |
| 664 sources += [ | |
| 665 "observatory_assets_empty.cc", | |
| 666 ] | |
| 667 } else { | |
| 668 deps += [ | |
| 669 "../observatory:standalone_observatory_archive", | |
| 670 ] | |
| 671 } | |
| 672 | |
| 673 include_dirs = [ | |
| 674 "..", | |
| 675 "//third_party", | |
| 676 ] | |
| 677 | |
| 678 ldflags = [ | |
| 679 "-rdynamic", | |
| 680 ] | |
| 681 } | |
| 682 | |
| 683 executable("dart_bootstrap") { | |
| 684 configs += ["..:dart_config", | |
| 685 "..:dart_product_config", | |
| 686 "..:dart_precompiler_config", | |
| 687 "..:dart_no_snapshot_config",] | |
| 688 deps = [ | |
| 689 ":gen_resources_cc", | |
| 690 ":embedded_dart_io", | |
| 691 ":libdart_builtin", | |
| 692 "../vm:libdart_platform", | |
| 693 "..:libdart", | |
| 694 "$dart_zlib_path", | |
| 695 ] | |
| 696 | |
| 697 sources = [ | |
| 698 "main.cc", | |
| 699 "vmservice_impl.cc", | |
| 700 "vmservice_impl.h", | |
| 701 "observatory_assets_empty.cc", | |
| 702 "snapshot_empty.cc", | |
| 703 "$target_gen_dir/resources_gen.cc", | |
| 704 ] | |
| 705 | |
| 706 include_dirs = [ | |
| 707 "..", | |
| 708 "//third_party", | |
| 709 ] | |
| 710 | |
| 711 ldflags = [ | |
| 712 "-rdynamic", | |
| 713 ] | |
| 714 } | |
| 715 | |
| 716 executable("process_test") { | |
| 717 sources = [ | |
| 718 "process_test.cc", | |
| 719 ] | |
| 720 } | |
| 721 | |
| 722 action("generate_snapshot_test_dat_file") { | |
| 723 snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat" | |
| 724 snapshot_test_in_dat_file = "../vm/snapshot_test_in.dat" | |
| 725 snapshot_test_dart_file = "../vm/snapshot_test.dart" | |
| 726 inputs = [ | |
| 727 "../tools/create_string_literal.py", | |
| 728 snapshot_test_in_dat_file, | |
| 729 snapshot_test_dart_file, | |
| 730 ] | |
| 731 | |
| 732 outputs = [ | |
| 733 snapshot_test_dat_file, | |
| 734 ] | |
| 735 | |
| 736 script = "../tools/create_string_literal.py" | |
| 737 args = [ | |
| 738 "--output", | |
| 739 rebase_path(snapshot_test_dat_file), | |
| 740 "--input_cc", | |
| 741 rebase_path(snapshot_test_in_dat_file), | |
| 742 "--include", | |
| 743 "INTENTIONALLY_LEFT_BLANK", | |
| 744 "--var_name", | |
| 745 "INTENTIONALLY_LEFT_BLANK_TOO", | |
| 746 rebase_path(snapshot_test_dart_file), | |
| 747 ] | |
| 748 } | |
| 749 | |
| 750 executable("run_vm_tests") { | |
| 751 configs += ["..:dart_config", | |
| 752 "..:dart_product_config"] | |
| 753 deps = [ | |
| 754 "..:libdart", | |
| 755 ":libdart_builtin", | |
| 756 ":embedded_dart_io", | |
| 757 ":dart_snapshot_cc", | |
| 758 ":generate_snapshot_test_dat_file", | |
| 759 "../vm:libdart_platform", | |
| 760 "$dart_zlib_path", | |
| 761 ] | |
| 762 include_dirs = [ | |
| 763 "..", | |
| 764 "$target_gen_dir", | |
| 765 ] | |
| 766 defines = [ | |
| 767 "TESTING", | |
| 768 ] | |
| 769 | |
| 770 vm_tests_list = exec_script("../../tools/gypi_to_gn.py", | |
| 771 [rebase_path("../vm/vm_sources.gypi"), | |
| 772 "--keep_only=_test.cc", | |
| 773 "--keep_only=_test.h",], | |
| 774 "scope", | |
| 775 ["../vm/vm_sources.gypi"]) | |
| 776 vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm") | |
| 777 | |
| 778 builtin_impl_tests_list = | |
| 779 exec_script("../../tools/gypi_to_gn.py", | |
| 780 [rebase_path("builtin_impl_sources.gypi"), | |
| 781 "--keep_only=_test.cc", | |
| 782 "--keep_only=_test.h",], | |
| 783 "scope", | |
| 784 ["builtin_impl_sources.gypi"]) | |
| 785 | |
| 786 sources = [ | |
| 787 "run_vm_tests.cc", | |
| 788 ] + builtin_impl_tests_list.sources + vm_tests | |
| 789 | |
| 790 ldflags = [ | |
| 791 "-rdynamic", | |
| 792 ] | |
| 793 } | |
| 794 | |
| 795 | |
| 796 shared_library("test_extension") { | |
| 797 deps = [ | |
| 798 ":dart", | |
| 799 ] | |
| 800 sources = [ | |
| 801 "test_extension.c", | |
| 802 "test_extension_dllmain_win.cc", | |
| 803 ] | |
| 804 include_dirs = [ | |
| 805 "..", | |
| 806 ] | |
| 807 defines = [ | |
| 808 # The only effect of DART_SHARED_LIB is to export the Dart API. | |
| 809 "DART_SHARED_LIB", | |
| 810 ] | |
| 811 } | |
| 812 | |
| 813 | |
| 814 shared_library("sample_extension") { | |
| 815 deps = [ | |
| 816 ":dart", | |
| 817 ] | |
| 818 sources = [ | |
| 819 "../../samples/sample_extension/sample_extension.cc", | |
| 820 "../../samples/sample_extension/sample_extension_dllmain_win.cc", | |
| 821 ] | |
| 822 include_dirs = [ | |
| 823 "..", | |
| 824 ] | |
| 825 defines = [ | |
| 826 # The only effect of DART_SHARED_LIB is to export the Dart API. | |
| 827 "DART_SHARED_LIB", | |
| 828 ] | |
| 829 } | |
| 830 | |
| 831 | |
| 440 if (defined(is_fuchsia) && is_fuchsia) { | 832 if (defined(is_fuchsia) && is_fuchsia) { |
| 441 copy("hello_fuchsia") { | 833 copy("hello_fuchsia") { |
| 442 sources = [ "../tests/vm/dart/hello_fuchsia_test.dart" ] | 834 sources = [ "../tests/vm/dart/hello_fuchsia_test.dart" ] |
| 443 outputs = [ "$root_out_dir/hello_fuchsia.dart" ] | 835 outputs = [ "$root_out_dir/hello_fuchsia.dart" ] |
| 444 } | 836 } |
| 445 | 837 |
| 446 executable("dart_no_observatory") { | 838 executable("dart_no_observatory") { |
| 447 configs += ["..:dart_config", | 839 configs += ["..:dart_config", |
| 448 "..:dart_product_config", | 840 "..:dart_product_config"] |
| 449 "..:dart_precompiled_runtime_config",] | |
| 450 deps = [ | 841 deps = [ |
| 451 ":hello_fuchsia", | 842 ":hello_fuchsia", |
| 452 ":gen_resources_cc", | 843 ":gen_resources_cc", |
| 453 ":embedded_dart_io", | 844 ":embedded_dart_io", |
| 454 ":libdart_builtin", | 845 ":libdart_builtin", |
| 455 "../vm:libdart_platform", | 846 "../vm:libdart_platform", |
| 456 "..:libdart", | 847 "..:libdart", |
| 457 ":dart_snapshot_cc", | 848 ":dart_snapshot_cc", |
| 458 "//third_party/zlib", | 849 "$dart_zlib_path", |
| 459 ] | 850 ] |
| 460 | 851 |
| 461 defines = [ | 852 defines = [ |
| 462 "NO_OBSERVATORY", | 853 "NO_OBSERVATORY", |
| 463 ] | 854 ] |
| 464 | 855 |
| 465 sources = [ | 856 sources = [ |
| 466 "main.cc", | 857 "main.cc", |
| 467 "observatory_assets_empty.cc", | 858 "observatory_assets_empty.cc", |
| 468 "vmservice_impl.cc", | 859 "vmservice_impl.cc", |
| 469 "vmservice_impl.h", | 860 "vmservice_impl.h", |
| 470 "$target_gen_dir/resources_gen.cc", | 861 "$target_gen_dir/resources_gen.cc", |
| 471 ] | 862 ] |
| 472 | 863 |
| 473 include_dirs = [ | 864 include_dirs = [ |
| 474 "..", | 865 "..", |
| 475 "//third_party", | 866 "//third_party", |
| 476 ] | 867 ] |
| 477 } | 868 } |
| 478 | 869 |
| 479 action("generate_snapshot_test_dat_file") { | |
| 480 snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat" | |
| 481 snapshot_test_in_dat_file = "../vm/snapshot_test_in.dat" | |
| 482 snapshot_test_dart_file = "../vm/snapshot_test.dart" | |
| 483 inputs = [ | |
| 484 "../tools/create_string_literal.py", | |
| 485 snapshot_test_in_dat_file, | |
| 486 snapshot_test_dart_file, | |
| 487 ] | |
| 488 | |
| 489 outputs = [ | |
| 490 snapshot_test_dat_file, | |
| 491 ] | |
| 492 | |
| 493 script = "../tools/create_string_literal.py" | |
| 494 args = [ | |
| 495 "--output", | |
| 496 rebase_path(snapshot_test_dat_file), | |
| 497 "--input_cc", | |
| 498 rebase_path(snapshot_test_in_dat_file), | |
| 499 "--include", | |
| 500 "INTENTIONALLY_LEFT_BLANK", | |
| 501 "--var_name", | |
| 502 "INTENTIONALLY_LEFT_BLANK_TOO", | |
| 503 rebase_path(snapshot_test_dart_file), | |
| 504 ] | |
| 505 } | |
| 506 | |
| 507 executable("run_vm_tests") { | |
| 508 testonly = true | |
| 509 configs += ["..:dart_config", | |
| 510 "..:dart_product_config", | |
| 511 "..:dart_precompiled_runtime_config",] | |
| 512 deps = [ | |
| 513 "..:libdart", | |
| 514 ":libdart_builtin", | |
| 515 ":embedded_dart_io", | |
| 516 ":dart_snapshot_cc", | |
| 517 ":generate_snapshot_test_dat_file", | |
| 518 "../vm:libdart_platform", | |
| 519 "//third_party/zlib", | |
| 520 ] | |
| 521 include_dirs = [ | |
| 522 "..", | |
| 523 "$target_gen_dir", | |
| 524 ] | |
| 525 defines = [ | |
| 526 "TESTING", | |
| 527 ] | |
| 528 | |
| 529 vm_tests_list = exec_script("../../tools/gypi_to_gn.py", | |
| 530 [rebase_path("../vm/vm_sources.gypi"), | |
| 531 "--keep_only=_test.cc", | |
| 532 "--keep_only=_test.h",], | |
| 533 "scope", | |
| 534 ["../vm/vm_sources.gypi"]) | |
| 535 vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm") | |
| 536 | |
| 537 builtin_impl_tests_list = | |
| 538 exec_script("../../tools/gypi_to_gn.py", | |
| 539 [rebase_path("builtin_impl_sources.gypi"), | |
| 540 "--keep_only=_test.cc", | |
| 541 "--keep_only=_test.h",], | |
| 542 "scope", | |
| 543 ["builtin_impl_sources.gypi"]) | |
| 544 | |
| 545 sources = [ | |
| 546 "run_vm_tests.cc", | |
| 547 ] + builtin_impl_tests_list.sources + vm_tests | |
| 548 } | |
| 549 | |
| 550 executable("run_vm_tests_fuchsia") { | 870 executable("run_vm_tests_fuchsia") { |
| 551 testonly = true | 871 testonly = true |
| 552 configs += ["..:dart_config"] | 872 configs += ["..:dart_config"] |
| 553 sources = [ | 873 sources = [ |
| 554 "run_vm_tests_fuchsia.cc" | 874 "run_vm_tests_fuchsia.cc" |
| 555 ] | 875 ] |
| 556 libs = [ | 876 libs = [ |
| 557 "launchpad", | 877 "launchpad", |
| 558 "magenta", | 878 "magenta", |
| 559 "runtime", | 879 "runtime", |
| 560 ] | 880 ] |
| 561 } | 881 } |
| 562 } # defined(is_fuchsia) && is_fuchsia | 882 } # defined(is_fuchsia) && is_fuchsia |
| OLD | NEW |