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 import("../runtime_args.gni") | 6 import("../runtime_args.gni") |
7 import("../../build/compiled_action.gni") | 7 import("../../build/compiled_action.gni") |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Controls the kind of core snapshot linked into the standalone VM. Using a | 10 # Controls the kind of core snapshot linked into the standalone VM. Using a |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 extra_sources += invoker.extra_sources | 612 extra_sources += invoker.extra_sources |
613 } | 613 } |
614 executable(target_name) { | 614 executable(target_name) { |
615 configs += [ | 615 configs += [ |
616 "..:dart_config", | 616 "..:dart_config", |
617 "..:dart_maybe_product_config", | 617 "..:dart_maybe_product_config", |
618 ] + extra_configs | 618 ] + extra_configs |
619 if (is_fuchsia) { | 619 if (is_fuchsia) { |
620 configs -= [ "//build/config:symbol_visibility_hidden" ] | 620 configs -= [ "//build/config:symbol_visibility_hidden" ] |
621 } | 621 } |
622 if (defined(is_fuchsia_host) && is_fuchsia_host) { | 622 if (is_fuchsia_host) { |
623 # We already have these in the standalone build, but Fuchsia doesn't | 623 # We already have these in the standalone build, but Fuchsia doesn't |
624 # have them. They are needed for running Fuchsia binaries built for the | 624 # have them. They are needed for running Fuchsia binaries built for the |
625 # host. | 625 # host. |
626 if (is_linux) { | 626 if (is_linux) { |
627 configs += [ "../../build/config/gcc:executable_ldconfig" ] | 627 configs += [ "../../build/config/gcc:executable_ldconfig" ] |
628 } else if (is_mac) { | 628 } else if (is_mac) { |
629 configs += [ "../../build/config/mac:mac_dynamic_flags" ] | 629 configs += [ "../../build/config/mac:mac_dynamic_flags" ] |
630 } | 630 } |
631 } | 631 } |
632 | 632 |
633 deps = [ | 633 deps = [ |
634 ":gen_resources_cc", | |
635 ":standalone_dart_io", | 634 ":standalone_dart_io", |
636 ":libdart_builtin", | 635 ":libdart_builtin", |
637 "$dart_zlib_path", | 636 "$dart_zlib_path", |
638 ] + extra_deps | 637 ] + extra_deps |
639 | 638 |
640 defines = extra_defines | 639 defines = extra_defines |
641 | 640 |
642 if (dart_use_tcmalloc) { | 641 if (dart_use_tcmalloc) { |
643 deps += [ "//third_party/tcmalloc" ] | 642 deps += [ "//third_party/tcmalloc" ] |
644 } | 643 } |
645 | 644 |
646 sources = [ | 645 sources = [ |
647 "error_exit.cc", | 646 "error_exit.cc", |
648 "error_exit.h", | 647 "error_exit.h", |
649 "main.cc", | 648 "main.cc", |
650 "snapshot_utils.cc", | 649 "snapshot_utils.cc", |
651 "snapshot_utils.h", | 650 "snapshot_utils.h", |
652 "vmservice_impl.cc", | 651 "vmservice_impl.cc", |
653 "vmservice_impl.h", | 652 "vmservice_impl.h", |
654 "$target_gen_dir/resources_gen.cc", | |
655 ] + extra_sources | 653 ] + extra_sources |
656 | 654 |
657 include_dirs = [ | 655 include_dirs = [ |
658 "..", | 656 "..", |
659 "//third_party", | 657 "//third_party", |
660 ] | 658 ] |
661 | 659 |
662 if (is_win) { | 660 if (is_win) { |
663 ldflags = [ "/EXPORT:Dart_True" ] | 661 ldflags = [ "/EXPORT:Dart_True" ] |
664 } else { | 662 } else { |
665 ldflags = [ "-rdynamic" ] | 663 if (dart_runtime_mode != "release") { |
| 664 ldflags = [ "-rdynamic" ] |
| 665 } |
666 } | 666 } |
667 | 667 |
668 if (is_win) { | 668 if (is_win) { |
669 libs = [ | 669 libs = [ |
670 "iphlpapi.lib", | 670 "iphlpapi.lib", |
671 "psapi.lib", | 671 "psapi.lib", |
672 "ws2_32.lib", | 672 "ws2_32.lib", |
673 "Rpcrt4.lib", | 673 "Rpcrt4.lib", |
674 "winmm.lib", | 674 "winmm.lib", |
675 ] | 675 ] |
676 } | 676 } |
677 | 677 |
678 if (is_fuchsia) { | 678 if (is_fuchsia) { |
679 libs = [ "launchpad" ] | 679 libs = [ "launchpad" ] |
680 } | 680 } |
681 } | 681 } |
682 } | 682 } |
683 | 683 |
684 dart_executable("dart") { | 684 dart_executable("dart") { |
685 extra_deps = [ | 685 extra_deps = [ |
686 "..:libdart_jit", | 686 "..:libdart_jit", |
687 ":dart_snapshot_cc", | 687 ":dart_snapshot_cc", |
688 "../observatory:standalone_observatory_archive", | 688 ":gen_resources_cc", |
689 ] | 689 ] |
| 690 if (dart_runtime_mode != "release") { |
| 691 extra_deps += [ "../observatory:standalone_observatory_archive" ] |
| 692 } |
690 extra_sources = [ | 693 extra_sources = [ |
691 "builtin_nolib.cc", | 694 "builtin_nolib.cc", |
692 "dfe.cc", | 695 "dfe.cc", |
693 "dfe.h", | 696 "dfe.h", |
694 "loader.cc", | 697 "loader.cc", |
695 "loader.h", | 698 "loader.h", |
| 699 "$target_gen_dir/resources_gen.cc", |
696 ] | 700 ] |
| 701 if (dart_runtime_mode == "release") { |
| 702 extra_sources += [ "observatory_assets_empty.cc" ] |
| 703 } |
697 } | 704 } |
698 | 705 |
699 dart_executable("dart_precompiled_runtime") { | 706 dart_executable("dart_precompiled_runtime") { |
700 extra_configs = [ "..:dart_precompiled_runtime_config" ] | 707 extra_configs = [ "..:dart_precompiled_runtime_config" ] |
701 extra_deps = [ | 708 extra_deps = [ "..:libdart_precompiled_runtime" ] |
702 "..:libdart_precompiled_runtime", | 709 if (dart_runtime_mode != "release") { |
703 "../observatory:standalone_observatory_archive", | 710 extra_deps += [ "../observatory:standalone_observatory_archive" ] |
704 ] | 711 } |
705 extra_sources = [ | 712 extra_sources = [ |
706 "builtin_nolib.cc", | 713 "builtin_nolib.cc", |
707 "snapshot_empty.cc", | 714 "snapshot_empty.cc", |
708 "loader.cc", | 715 "loader.cc", |
709 "loader.h", | 716 "loader.h", |
710 ] | 717 ] |
| 718 if (dart_runtime_mode == "release") { |
| 719 extra_sources += [ "observatory_assets_empty.cc" ] |
| 720 } |
711 } | 721 } |
712 | 722 |
713 dart_executable("dart_bootstrap") { | 723 dart_executable("dart_bootstrap") { |
714 extra_configs = [ | 724 extra_configs = [ |
715 "..:dart_precompiler_config", | 725 "..:dart_precompiler_config", |
716 "..:dart_no_snapshot_config", | 726 "..:dart_no_snapshot_config", |
717 ] | 727 ] |
718 extra_deps = [ | 728 extra_deps = [ |
| 729 ":gen_resources_cc", |
| 730 ":generate_blink_cc_file", |
719 ":generate_builtin_cc_file", | 731 ":generate_builtin_cc_file", |
| 732 ":generate_cached_patches_cc_file", |
| 733 ":generate_html_cc_file", |
| 734 ":generate_html_common_cc_file", |
| 735 ":generate_indexed_db_cc_file", |
720 ":generate_io_cc_file", | 736 ":generate_io_cc_file", |
721 ":generate_io_patch_cc_file", | 737 ":generate_io_patch_cc_file", |
722 ":generate_html_cc_file", | |
723 ":generate_html_common_cc_file", | |
724 ":generate_js_cc_file", | 738 ":generate_js_cc_file", |
725 ":generate_js_util_cc_file", | 739 ":generate_js_util_cc_file", |
726 ":generate_blink_cc_file", | |
727 ":generate_indexed_db_cc_file", | |
728 ":generate_cached_patches_cc_file", | |
729 ":generate_web_gl_cc_file", | |
730 ":generate_metadata_cc_file", | 740 ":generate_metadata_cc_file", |
731 ":generate_web_sql_cc_file", | |
732 ":generate_svg_cc_file", | 741 ":generate_svg_cc_file", |
733 ":generate_web_audio_cc_file", | 742 ":generate_web_audio_cc_file", |
| 743 ":generate_web_gl_cc_file", |
| 744 ":generate_web_sql_cc_file", |
734 "..:libdart_nosnapshot_with_precompiler", | 745 "..:libdart_nosnapshot_with_precompiler", |
735 ] | 746 ] |
736 extra_defines = [ "NO_OBSERVATORY" ] | 747 extra_defines = [ "NO_OBSERVATORY" ] |
737 extra_sources = [ | 748 extra_sources = [ |
738 "builtin.cc", | 749 "builtin.cc", |
739 "builtin.h", | 750 "builtin.h", |
740 "dfe.cc", | 751 "dfe.cc", |
741 "dfe.h", | 752 "dfe.h", |
742 "loader.cc", | 753 "loader.cc", |
743 "loader.h", | 754 "loader.h", |
744 "observatory_assets_empty.cc", | 755 "observatory_assets_empty.cc", |
745 "snapshot_empty.cc", | 756 "snapshot_empty.cc", |
746 | 757 |
747 # Include generated source files. | 758 # Include generated source files. |
| 759 "$target_gen_dir/blink_gen.cc", |
748 "$target_gen_dir/builtin_gen.cc", | 760 "$target_gen_dir/builtin_gen.cc", |
| 761 "$target_gen_dir/cached_patches_gen.cc", |
| 762 "$target_gen_dir/html_common_gen.cc", |
| 763 "$target_gen_dir/html_gen.cc", |
| 764 "$target_gen_dir/indexed_db_gen.cc", |
749 "$target_gen_dir/io_gen.cc", | 765 "$target_gen_dir/io_gen.cc", |
750 "$target_gen_dir/io_patch_gen.cc", | 766 "$target_gen_dir/io_patch_gen.cc", |
751 "$target_gen_dir/html_gen.cc", | |
752 "$target_gen_dir/html_common_gen.cc", | |
753 "$target_gen_dir/js_gen.cc", | 767 "$target_gen_dir/js_gen.cc", |
754 "$target_gen_dir/js_util_gen.cc", | 768 "$target_gen_dir/js_util_gen.cc", |
755 "$target_gen_dir/blink_gen.cc", | |
756 "$target_gen_dir/indexed_db_gen.cc", | |
757 "$target_gen_dir/cached_patches_gen.cc", | |
758 "$target_gen_dir/web_gl_gen.cc", | |
759 "$target_gen_dir/metadata_gen.cc", | 769 "$target_gen_dir/metadata_gen.cc", |
760 "$target_gen_dir/web_sql_gen.cc", | 770 "$target_gen_dir/resources_gen.cc", |
761 "$target_gen_dir/svg_gen.cc", | 771 "$target_gen_dir/svg_gen.cc", |
762 "$target_gen_dir/web_audio_gen.cc", | 772 "$target_gen_dir/web_audio_gen.cc", |
| 773 "$target_gen_dir/web_gl_gen.cc", |
| 774 "$target_gen_dir/web_sql_gen.cc", |
763 ] | 775 ] |
764 } | 776 } |
765 | 777 |
766 if (is_fuchsia) { | 778 if (is_fuchsia) { |
767 hello_fuchsia_source = rebase_path("../tests/vm/dart/hello_fuchsia_test.dart") | 779 hello_fuchsia_source = rebase_path("../tests/vm/dart/hello_fuchsia_test.dart") |
768 | 780 |
769 copy("hello_fuchsia") { | 781 copy("hello_fuchsia") { |
770 sources = [ | 782 sources = [ |
771 hello_fuchsia_source, | 783 hello_fuchsia_source, |
772 ] | 784 ] |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 ] | 953 ] |
942 if (is_linux || is_android) { | 954 if (is_linux || is_android) { |
943 cflags = [ "-fPIC" ] | 955 cflags = [ "-fPIC" ] |
944 } | 956 } |
945 if (is_win) { | 957 if (is_win) { |
946 libs = [ "dart.lib" ] | 958 libs = [ "dart.lib" ] |
947 abs_root_out_dir = rebase_path(root_out_dir) | 959 abs_root_out_dir = rebase_path(root_out_dir) |
948 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 960 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
949 } | 961 } |
950 } | 962 } |
OLD | NEW |