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("gypi_contents.gni") |
6 | 6 import("../runtime_args.gni") |
7 declare_args() { | |
8 # Whether to fall back to built-in root certificates when they cannot be | |
9 # verified at the operating system level. | |
10 dart_use_fallback_root_certificates = false | |
11 | |
12 # The BUILD.gn file that we pull from chromium as part of zlib has a | |
13 # dependence on //base, which we don't pull in. In a standalone build of the | |
14 # VM, we set this to //runtime/bin/zlib where we have a BUILD.gn file without | |
15 # a dependence on //base. | |
16 dart_zlib_path = "//third_party/zlib" | |
17 | |
18 # Whether to link the standalone VM against tcmalloc. The standalone build of | |
19 # the VM enables this only for Linux builds. | |
20 dart_use_tcmalloc = false | |
21 } | |
22 | |
23 # TODO(zra): Remove this when Fuchsia has a root cert cache on the filesystem. | |
24 if (defined(is_fuchsia) && is_fuchsia) { | |
25 dart_use_fallback_root_certificates = true | |
26 } | |
27 | 7 |
28 # Generate a resources.cc file for the service isolate without Observatory. | 8 # Generate a resources.cc file for the service isolate without Observatory. |
29 action("gen_resources_cc") { | 9 action("gen_resources_cc") { |
30 visibility = [ ":*" ] # Only targets in this file can see this. | 10 visibility = [ ":*" ] # Only targets in this file can see this. |
31 script = "../tools/create_resources.py" | 11 script = "../tools/create_resources.py" |
32 inputs = [ | 12 inputs = [ |
33 "../tools/create_resources.py", | 13 "../tools/create_resources.py", |
34 ] | 14 ] |
35 | 15 |
36 # The path below is hard coded for the Mojo and Flutter trees. When moving | 16 # The path below is hard coded for the Mojo and Flutter trees. When moving |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 } | 563 } |
584 } | 564 } |
585 | 565 |
586 deps = [ | 566 deps = [ |
587 ":gen_resources_cc", | 567 ":gen_resources_cc", |
588 ":standalone_dart_io", | 568 ":standalone_dart_io", |
589 ":libdart_builtin", | 569 ":libdart_builtin", |
590 "$dart_zlib_path", | 570 "$dart_zlib_path", |
591 ] + extra_deps | 571 ] + extra_deps |
592 | 572 |
| 573 defines = extra_defines |
| 574 |
593 if (dart_use_tcmalloc) { | 575 if (dart_use_tcmalloc) { |
594 deps += [ "//third_party/tcmalloc" ] | 576 deps += [ "//third_party/tcmalloc" ] |
| 577 defines += [ "DART_USE_TCMALLOC" ] |
595 } | 578 } |
596 | 579 |
597 defines = extra_defines | |
598 | |
599 sources = [ | 580 sources = [ |
600 "main.cc", | 581 "main.cc", |
601 "vmservice_impl.cc", | 582 "vmservice_impl.cc", |
602 "vmservice_impl.h", | 583 "vmservice_impl.h", |
603 "$target_gen_dir/resources_gen.cc", | 584 "$target_gen_dir/resources_gen.cc", |
604 ] + extra_sources | 585 ] + extra_sources |
605 | 586 |
606 include_dirs = [ | 587 include_dirs = [ |
607 "..", | 588 "..", |
608 "//third_party", | 589 "//third_party", |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 "..:libdart", | 784 "..:libdart", |
804 ] | 785 ] |
805 include_dirs = [ | 786 include_dirs = [ |
806 "..", | 787 "..", |
807 "$target_gen_dir", | 788 "$target_gen_dir", |
808 ] | 789 ] |
809 defines = [ "TESTING" ] | 790 defines = [ "TESTING" ] |
810 | 791 |
811 if (dart_use_tcmalloc) { | 792 if (dart_use_tcmalloc) { |
812 deps += [ "//third_party/tcmalloc" ] | 793 deps += [ "//third_party/tcmalloc" ] |
| 794 defines += [ "DART_USE_TCMALLOC" ] |
813 } | 795 } |
814 | 796 |
815 # The VM sources are already included in libdart, so we just want to add in | 797 # The VM sources are already included in libdart, so we just want to add in |
816 # the tests here. | 798 # the tests here. |
817 vm_tests = rebase_path(vm_tests_list, ".", "../vm") | 799 vm_tests = rebase_path(vm_tests_list, ".", "../vm") |
818 | 800 |
819 sources = [ | 801 sources = [ |
820 "builtin_nolib.cc", | 802 "builtin_nolib.cc", |
821 "run_vm_tests.cc", | 803 "run_vm_tests.cc", |
822 ] + builtin_impl_tests_list + vm_tests | 804 ] + builtin_impl_tests_list + vm_tests |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 defines = [ | 850 defines = [ |
869 # The only effect of DART_SHARED_LIB is to export the Dart API. | 851 # The only effect of DART_SHARED_LIB is to export the Dart API. |
870 "DART_SHARED_LIB", | 852 "DART_SHARED_LIB", |
871 ] | 853 ] |
872 if (is_win) { | 854 if (is_win) { |
873 libs = [ "dart.lib" ] | 855 libs = [ "dart.lib" ] |
874 abs_root_out_dir = rebase_path(root_out_dir) | 856 abs_root_out_dir = rebase_path(root_out_dir) |
875 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 857 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
876 } | 858 } |
877 } | 859 } |
OLD | NEW |