| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'conditions': [ | 6 'conditions': [ |
| 7 ['OS=="android"', { | 7 ['OS=="android"', { |
| 8 'targets': [ | 8 'targets': [ |
| 9 { | 9 { |
| 10 'target_name': 'cronet_jni_headers', | 10 'target_name': 'cronet_jni_headers', |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 '<(SHARED_LIB_DIR)/<(native_lib)', | 705 '<(SHARED_LIB_DIR)/<(native_lib)', |
| 706 ], | 706 ], |
| 707 }, | 707 }, |
| 708 ], | 708 ], |
| 709 }, | 709 }, |
| 710 ], | 710 ], |
| 711 'variables': { | 711 'variables': { |
| 712 'enable_data_reduction_proxy_support%': 0, | 712 'enable_data_reduction_proxy_support%': 0, |
| 713 }, | 713 }, |
| 714 }], # OS=="android" | 714 }], # OS=="android" |
| 715 ['OS=="ios"', { |
| 716 'targets': [ |
| 717 { # TODO(mef): Dedup this with copy in OS=="android" section. |
| 718 'target_name': 'cronet_version_header', |
| 719 'type': 'none', |
| 720 # Need to set hard_depency flag because cronet_version generates a |
| 721 # header. |
| 722 'hard_dependency': 1, |
| 723 'direct_dependent_settings': { |
| 724 'include_dirs': [ |
| 725 '<(SHARED_INTERMEDIATE_DIR)/', |
| 726 ], |
| 727 }, |
| 728 'actions': [ |
| 729 { |
| 730 'action_name': 'version_header', |
| 731 'message': 'Generating version header file: <@(_outputs)', |
| 732 'inputs': [ |
| 733 '<(version_path)', |
| 734 'cronet/version.h.in', |
| 735 ], |
| 736 'outputs': [ |
| 737 '<(SHARED_INTERMEDIATE_DIR)/components/cronet/version.h', |
| 738 ], |
| 739 'action': [ |
| 740 'python', |
| 741 '<(version_py_path)', |
| 742 '-e', 'VERSION_FULL="<(version_full)"', |
| 743 'cronet/version.h.in', |
| 744 '<@(_outputs)', |
| 745 ], |
| 746 'includes': [ |
| 747 '../build/util/version.gypi', |
| 748 ], |
| 749 }, |
| 750 ], |
| 751 }, |
| 752 { |
| 753 'target_name': 'cronet_static', |
| 754 'type': 'static_library', |
| 755 'sources': [ |
| 756 'cronet/ios/Cronet.h', |
| 757 'cronet/ios/Cronet.mm', |
| 758 'cronet/ios/cronet_bidirectional_stream.h', |
| 759 'cronet/ios/cronet_bidirectional_stream.cc', |
| 760 'cronet/ios/cronet_c_for_grpc.h', |
| 761 'cronet/ios/cronet_c_for_grpc.cc', |
| 762 'cronet/ios/cronet_environment.cc', |
| 763 'cronet/ios/cronet_environment.h', |
| 764 'cronet/url_request_context_config.cc', |
| 765 'cronet/url_request_context_config.h', |
| 766 ], |
| 767 'dependencies': [ |
| 768 'cronet_version_header', |
| 769 '../base/base.gyp:base', |
| 770 '../net/net.gyp:net', |
| 771 ], |
| 772 'cflags': [ |
| 773 '-fdata-sections', |
| 774 '-ffunction-sections', |
| 775 '-fno-rtti', |
| 776 '-fvisibility-inlines-hidden', |
| 777 '-Wno-sign-promo', |
| 778 '-Wno-missing-field-initializers', |
| 779 ], |
| 780 'ldflags': [ |
| 781 '-llog', |
| 782 '-Wl,--gc-sections', |
| 783 '-Wl,--exclude-libs,ALL' |
| 784 ], |
| 785 }, |
| 786 { |
| 787 'target_name': 'libcronet', |
| 788 'type': 'shared_library', |
| 789 'sources': [ |
| 790 'cronet/ios/Cronet.h', |
| 791 'cronet/ios/Cronet.mm', |
| 792 ], |
| 793 'dependencies': [ |
| 794 'cronet_static', |
| 795 '../base/base.gyp:base', |
| 796 ], |
| 797 }, |
| 798 { |
| 799 'target_name': 'cronet_test', |
| 800 'type': 'executable', |
| 801 'dependencies': [ |
| 802 'cronet_static', |
| 803 '../net/net.gyp:net_quic_proto', |
| 804 '../net/net.gyp:net_test_support', |
| 805 '../net/net.gyp:simple_quic_tools', |
| 806 '../testing/gtest.gyp:gtest', |
| 807 ], |
| 808 'sources': [ |
| 809 'cronet/ios/test/cronet_bidirectional_stream_test.mm', |
| 810 'cronet/ios/test/cronet_test_runner.mm', |
| 811 'cronet/ios/test/quic_test_server.cc', |
| 812 'cronet/ios/test/quic_test_server.h', |
| 813 ], |
| 814 'mac_bundle_resources': [ |
| 815 '../net/data/ssl/certificates/quic_test.example.com.crt', |
| 816 '../net/data/ssl/certificates/quic_test.example.com.key', |
| 817 '../net/data/ssl/certificates/quic_test.example.com.key.pkcs8', |
| 818 '../net/data/ssl/certificates/quic_test.example.com.key.sct', |
| 819 ], |
| 820 'include_dirs': [ |
| 821 '..', |
| 822 ], |
| 823 }, |
| 824 { |
| 825 # Build this target to package a standalone Cronet in a single |
| 826 # .a file. |
| 827 'target_name': 'cronet_package', |
| 828 'type': 'none', |
| 829 'variables' : { |
| 830 'package_dir': '<(PRODUCT_DIR)/cronet', |
| 831 }, |
| 832 'dependencies': [ |
| 833 # Depend on the dummy target so that all of CrNet's dependencies |
| 834 # are built before packaging. |
| 835 'libcronet', |
| 836 ], |
| 837 'actions': [ |
| 838 { |
| 839 'action_name': 'Package Cronet', |
| 840 'variables': { |
| 841 'tool_path': |
| 842 'cronet/tools/link_dependencies.py', |
| 843 }, |
| 844 # Actions need an inputs list, even if it's empty. |
| 845 'inputs': [ |
| 846 '<(tool_path)', |
| 847 '<(PRODUCT_DIR)/libcronet.dylib', |
| 848 ], |
| 849 # Only specify one output, since this will be libtool's output. |
| 850 'outputs': [ '<(package_dir)/libcronet_standalone_with_symbols.a
' ], |
| 851 'action': ['<(tool_path)', |
| 852 '<(PRODUCT_DIR)', |
| 853 'libcronet.dylib', |
| 854 '<@(_outputs)', |
| 855 ], |
| 856 }, |
| 857 { |
| 858 'action_name': 'Stripping standalone library', |
| 859 # Actions need an inputs list, even if it's empty. |
| 860 'inputs': [ |
| 861 '<(package_dir)/libcronet_standalone_with_symbols.a', |
| 862 ], |
| 863 # Only specify one output, since this will be libtool's output. |
| 864 'outputs': [ '<(package_dir)/libcronet_standalone.a' ], |
| 865 'action': ['strip', |
| 866 '-S', |
| 867 '<@(_inputs)', |
| 868 '-o', |
| 869 '<@(_outputs)', |
| 870 ], |
| 871 }, |
| 872 ], |
| 873 'copies': [ |
| 874 { |
| 875 'destination': '<(package_dir)', |
| 876 'files': [ |
| 877 '../chrome/VERSION', |
| 878 'cronet/ios/Cronet.h', |
| 879 'cronet/ios/cronet_c_for_grpc.h', |
| 880 ], |
| 881 }, |
| 882 { |
| 883 'destination': '<(package_dir)/test', |
| 884 'files': [ |
| 885 'cronet/ios/test/cronet_bidirectional_stream_test.mm', |
| 886 'cronet/ios/test/cronet_test_runner.mm', |
| 887 ], |
| 888 }, |
| 889 ], |
| 890 }, |
| 891 ], |
| 892 }], # OS=="ios" |
| 715 ], | 893 ], |
| 716 } | 894 } |
| OLD | NEW |