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 import("gypi_contents.gni") | 5 import("../../build/compiled_action.gni") |
| 6 import("../../sdk/lib/io/io_sources.gni") |
6 import("../runtime_args.gni") | 7 import("../runtime_args.gni") |
7 import("../../build/compiled_action.gni") | 8 import("../vm/vm_sources.gni") |
| 9 import("builtin_impl_sources.gni") |
| 10 import("builtin_sources.gni") |
| 11 import("io_impl_sources.gni") |
| 12 import("io_sources.gni") |
| 13 import("vmservice/vmservice_sources.gni") |
8 | 14 |
9 declare_args() { | 15 declare_args() { |
10 # Controls the kind of core snapshot linked into the standalone VM. Using a | 16 # Controls the kind of core snapshot linked into the standalone VM. Using a |
11 # core-jit snapshot breaks the ability to change various flags that affect | 17 # core-jit snapshot breaks the ability to change various flags that affect |
12 # code generation. | 18 # code generation. |
13 dart_core_snapshot_kind = "core" | 19 dart_core_snapshot_kind = "core" |
14 } | 20 } |
15 | 21 |
16 # Generate a resources.cc file for the service isolate without Observatory. | 22 # Generate a resources.cc file for the service isolate without Observatory. |
17 action("gen_resources_cc") { | 23 action("gen_resources_cc") { |
18 visibility = [ ":*" ] # Only targets in this file can see this. | 24 visibility = [ ":*" ] # Only targets in this file can see this. |
19 script = "../tools/create_resources.py" | 25 script = "../tools/create_resources.py" |
20 inputs = [ | 26 inputs = [ |
21 "../tools/create_resources.py", | 27 "../tools/create_resources.py", |
22 ] | 28 ] |
23 | 29 |
24 # The path below is hard coded for the Mojo and Flutter trees. When moving | 30 # The path below is hard coded for the Mojo and Flutter trees. When moving |
25 # the Dart runtime to gn, this path might need to be updated. | 31 # the Dart runtime to gn, this path might need to be updated. |
26 sources = rebase_path(resources_sources_gypi, "", "../bin/vmservice/") | 32 sources = rebase_path(vmservice_sources, "", "../bin/vmservice/") |
27 outputs = [ | 33 outputs = [ |
28 "$target_gen_dir/resources_gen.cc", | 34 "$target_gen_dir/resources_gen.cc", |
29 ] | 35 ] |
30 args = [ | 36 args = [ |
31 "--output", | 37 "--output", |
32 rebase_path("$target_gen_dir/resources_gen.cc", root_build_dir), | 38 rebase_path("$target_gen_dir/resources_gen.cc", root_build_dir), |
33 "--outer_namespace", | 39 "--outer_namespace", |
34 "dart", | 40 "dart", |
35 "--inner_namespace", | 41 "--inner_namespace", |
36 "bin", | 42 "bin", |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 "dart::bin::Builtin::${name}_${kind}_paths_", | 77 "dart::bin::Builtin::${name}_${kind}_paths_", |
72 "--library_name", | 78 "--library_name", |
73 library_name, | 79 library_name, |
74 ] + rebase_path(invoker.sources, root_build_dir) | 80 ] + rebase_path(invoker.sources, root_build_dir) |
75 } | 81 } |
76 } | 82 } |
77 | 83 |
78 gen_library_src_path("generate_builtin_cc_file") { | 84 gen_library_src_path("generate_builtin_cc_file") { |
79 name = "_builtin" | 85 name = "_builtin" |
80 kind = "source" | 86 kind = "source" |
81 sources = builtin_sources_gypi | 87 sources = builtin_sources |
82 output = "$target_gen_dir/builtin_gen.cc" | 88 output = "$target_gen_dir/builtin_gen.cc" |
83 } | 89 } |
84 | 90 |
85 sdk_io_sources_gypi = | 91 rebased_io_sdk_sources = rebase_path(io_sdk_sources, ".", "../../sdk/lib/io") |
86 exec_script("../../tools/gypi_to_gn.py", | |
87 [ rebase_path("../../sdk/lib/io/io_sources.gypi") ], | |
88 "scope", | |
89 [ "../../sdk/lib/io/io_sources.gypi" ]) | |
90 sdk_io_sources = | |
91 rebase_path(sdk_io_sources_gypi.sources, ".", "../../sdk/lib/io") | |
92 | 92 |
93 gen_library_src_path("generate_io_cc_file") { | 93 gen_library_src_path("generate_io_cc_file") { |
94 name = "io" | 94 name = "io" |
95 kind = "source" | 95 kind = "source" |
96 sources = [ "../../sdk/lib/io/io.dart" ] + sdk_io_sources | 96 sources = [ "../../sdk/lib/io/io.dart" ] + rebased_io_sdk_sources |
97 output = "$target_gen_dir/io_gen.cc" | 97 output = "$target_gen_dir/io_gen.cc" |
98 } | 98 } |
99 | 99 |
100 gen_library_src_path("generate_io_patch_cc_file") { | 100 gen_library_src_path("generate_io_patch_cc_file") { |
101 name = "io" | 101 name = "io" |
102 kind = "patch" | 102 kind = "patch" |
103 sources = io_sources_gypi | 103 sources = io_runtime_sources |
104 output = "$target_gen_dir/io_patch_gen.cc" | 104 output = "$target_gen_dir/io_patch_gen.cc" |
105 } | 105 } |
106 | 106 |
107 gen_library_src_path("generate_html_cc_file") { | 107 gen_library_src_path("generate_html_cc_file") { |
108 name = "html" | 108 name = "html" |
109 kind = "source" | 109 kind = "source" |
110 sources = [ | 110 sources = [ |
111 "../../sdk/lib/html/dartium/html_dartium.dart", | 111 "../../sdk/lib/html/dartium/html_dartium.dart", |
112 ] | 112 ] |
113 output = "$target_gen_dir/html_gen.cc" | 113 output = "$target_gen_dir/html_gen.cc" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 set_sources_assignment_filter([ | 264 set_sources_assignment_filter([ |
265 "*_test.cc", | 265 "*_test.cc", |
266 "*_test.h", | 266 "*_test.h", |
267 ]) | 267 ]) |
268 sources = [ | 268 sources = [ |
269 "log_android.cc", | 269 "log_android.cc", |
270 "log_fuchsia.cc", | 270 "log_fuchsia.cc", |
271 "log_linux.cc", | 271 "log_linux.cc", |
272 "log_macos.cc", | 272 "log_macos.cc", |
273 "log_win.cc", | 273 "log_win.cc", |
274 ] + builtin_impl_sources_gypi | 274 ] + builtin_impl_sources |
275 } | 275 } |
276 } | 276 } |
277 | 277 |
278 build_libdart_builtin("libdart_builtin") { | 278 build_libdart_builtin("libdart_builtin") { |
279 extra_configs = [ "..:dart_maybe_product_config" ] | 279 extra_configs = [ "..:dart_maybe_product_config" ] |
280 } | 280 } |
281 | 281 |
282 build_libdart_builtin("libdart_builtin_product") { | 282 build_libdart_builtin("libdart_builtin_product") { |
283 extra_configs = [ "..:dart_product_config" ] | 283 extra_configs = [ "..:dart_product_config" ] |
284 } | 284 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 # Dart tree uses *_macos.* instead of *_mac.* | 412 # Dart tree uses *_macos.* instead of *_mac.* |
413 custom_sources_filter += [ | 413 custom_sources_filter += [ |
414 "*_macos.h", | 414 "*_macos.h", |
415 "*_macos.cc", | 415 "*_macos.cc", |
416 ] | 416 ] |
417 } | 417 } |
418 set_sources_assignment_filter(custom_sources_filter) | 418 set_sources_assignment_filter(custom_sources_filter) |
419 | 419 |
420 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] | 420 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] |
421 | 421 |
422 sources = io_impl_sources_gypi + builtin_impl_sources_gypi | 422 sources = io_impl_sources + builtin_impl_sources |
423 sources += [ | 423 sources += [ |
424 "io_natives.cc", | 424 "io_natives.cc", |
425 "io_natives.h", | 425 "io_natives.h", |
426 ] | 426 ] |
427 | 427 |
428 include_dirs = [ | 428 include_dirs = [ |
429 "..", | 429 "..", |
430 "//third_party", | 430 "//third_party", |
431 ] | 431 ] |
432 } | 432 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 libs += [ "CoreServices.framework" ] | 484 libs += [ "CoreServices.framework" ] |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 deps += [ "//third_party/boringssl" ] | 488 deps += [ "//third_party/boringssl" ] |
489 | 489 |
490 if (is_fuchsia) { | 490 if (is_fuchsia) { |
491 libs = [ "launchpad" ] | 491 libs = [ "launchpad" ] |
492 } | 492 } |
493 | 493 |
494 sources = io_impl_sources_gypi + builtin_impl_sources_gypi | 494 sources = io_impl_sources + builtin_impl_sources |
495 sources += [ | 495 sources += [ |
496 "builtin_natives.cc", | 496 "builtin_natives.cc", |
497 "io_natives.cc", | 497 "io_natives.cc", |
498 "io_natives.h", | 498 "io_natives.h", |
499 "log_android.cc", | 499 "log_android.cc", |
500 "log_linux.cc", | 500 "log_linux.cc", |
501 "log_macos.cc", | 501 "log_macos.cc", |
502 "log_win.cc", | 502 "log_win.cc", |
503 "log.h", | 503 "log.h", |
504 ] + extra_sources | 504 ] + extra_sources |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 deps += [ "//third_party/tcmalloc" ] | 974 deps += [ "//third_party/tcmalloc" ] |
975 defines += [ "DART_USE_TCMALLOC" ] | 975 defines += [ "DART_USE_TCMALLOC" ] |
976 } | 976 } |
977 | 977 |
978 if (is_fuchsia) { | 978 if (is_fuchsia) { |
979 deps += [ "//apps/tracing/lib/trace" ] | 979 deps += [ "//apps/tracing/lib/trace" ] |
980 } | 980 } |
981 | 981 |
982 # The VM sources are already included in libdart, so we just want to add in | 982 # The VM sources are already included in libdart, so we just want to add in |
983 # the tests here. | 983 # the tests here. |
984 vm_tests = rebase_path(vm_tests_list, ".", "../vm") | 984 vm_tests = rebase_path(vm_sources_tests, ".", "../vm") |
985 | 985 |
986 sources = [ | 986 sources = [ |
987 "error_exit.cc", | 987 "error_exit.cc", |
988 "error_exit.h", | 988 "error_exit.h", |
989 "snapshot_utils.cc", | 989 "snapshot_utils.cc", |
990 "snapshot_utils.h", | 990 "snapshot_utils.h", |
991 "builtin_nolib.cc", | 991 "builtin_nolib.cc", |
992 "run_vm_tests.cc", | 992 "run_vm_tests.cc", |
993 "dfe.cc", | 993 "dfe.cc", |
994 "dfe.h", | 994 "dfe.h", |
995 ] + builtin_impl_tests_list + vm_tests | 995 ] + builtin_impl_tests + vm_tests |
996 | 996 |
997 if (!is_win) { | 997 if (!is_win) { |
998 ldflags = [ "-rdynamic" ] | 998 ldflags = [ "-rdynamic" ] |
999 } | 999 } |
1000 | 1000 |
1001 if (is_win) { | 1001 if (is_win) { |
1002 libs = [ | 1002 libs = [ |
1003 "iphlpapi.lib", | 1003 "iphlpapi.lib", |
1004 "psapi.lib", | 1004 "psapi.lib", |
1005 "ws2_32.lib", | 1005 "ws2_32.lib", |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 ] | 1047 ] |
1048 if (is_linux || is_android) { | 1048 if (is_linux || is_android) { |
1049 cflags = [ "-fPIC" ] | 1049 cflags = [ "-fPIC" ] |
1050 } | 1050 } |
1051 if (is_win) { | 1051 if (is_win) { |
1052 libs = [ "dart.lib" ] | 1052 libs = [ "dart.lib" ] |
1053 abs_root_out_dir = rebase_path(root_out_dir) | 1053 abs_root_out_dir = rebase_path(root_out_dir) |
1054 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 1054 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
1055 } | 1055 } |
1056 } | 1056 } |
OLD | NEW |