Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: components/cronet.gypi

Issue 1858483002: Cronet for iOS with C API for GRPC support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@small
Patch Set: Make cronet_environment a cc. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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" or OS=="ios"', {
8 'targets': [
9 {
10 'target_name': 'cronet_version_header',
11 'type': 'none',
12 # Need to set hard_depency flag because cronet_version generates a
13 # header.
14 'hard_dependency': 1,
15 'direct_dependent_settings': {
16 'include_dirs': [
17 '<(SHARED_INTERMEDIATE_DIR)/',
18 ],
19 },
20 'actions': [
21 {
22 'action_name': 'version_header',
23 'message': 'Generating version header file: <@(_outputs)',
24 'inputs': [
25 '<(version_path)',
26 'cronet/version.h.in',
27 ],
28 'outputs': [
29 '<(SHARED_INTERMEDIATE_DIR)/components/cronet/version.h',
30 ],
31 'action': [
32 'python',
33 '<(version_py_path)',
34 '-e', 'VERSION_FULL="<(version_full)"',
35 'cronet/version.h.in',
36 '<@(_outputs)',
37 ],
38 'includes': [
39 '../build/util/version.gypi',
40 ],
41 },
42 ],
43 },
44 ],
45 }],
7 ['OS=="android"', { 46 ['OS=="android"', {
8 'targets': [ 47 'targets': [
9 { 48 {
10 'target_name': 'cronet_jni_headers', 49 'target_name': 'cronet_jni_headers',
11 'type': 'none', 50 'type': 'none',
12 'sources': [ 51 'sources': [
13 'cronet/android/java/src/org/chromium/net/CronetBidirectionalStream. java', 52 'cronet/android/java/src/org/chromium/net/CronetBidirectionalStream. java',
14 'cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java', 53 'cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java',
15 'cronet/android/java/src/org/chromium/net/CronetUploadDataStream.jav a', 54 'cronet/android/java/src/org/chromium/net/CronetUploadDataStream.jav a',
16 'cronet/android/java/src/org/chromium/net/CronetUrlRequest.java', 55 'cronet/android/java/src/org/chromium/net/CronetUrlRequest.java',
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 '-f', '<(version_path)', 171 '-f', '<(version_path)',
133 '-f', '<(lastchange_path)', 172 '-f', '<(lastchange_path)',
134 '<(template_input_path)', 173 '<(template_input_path)',
135 '<(output_path)', 174 '<(output_path)',
136 ], 175 ],
137 'message': 'Generating version information', 176 'message': 'Generating version information',
138 }, 177 },
139 ], 178 ],
140 }, 179 },
141 { 180 {
142 'target_name': 'cronet_version_header',
143 'type': 'none',
144 # Need to set hard_depency flag because cronet_version generates a
145 # header.
146 'hard_dependency': 1,
147 'direct_dependent_settings': {
148 'include_dirs': [
149 '<(SHARED_INTERMEDIATE_DIR)/',
150 ],
151 },
152 'actions': [
153 {
154 'action_name': 'version_header',
155 'message': 'Generating version header file: <@(_outputs)',
156 'inputs': [
157 '<(version_path)',
158 'cronet/version.h.in',
159 ],
160 'outputs': [
161 '<(SHARED_INTERMEDIATE_DIR)/components/cronet/version.h',
162 ],
163 'action': [
164 'python',
165 '<(version_py_path)',
166 '-e', 'VERSION_FULL="<(version_full)"',
167 'cronet/version.h.in',
168 '<@(_outputs)',
169 ],
170 'includes': [
171 '../build/util/version.gypi',
172 ],
173 },
174 ],
175 },
176 {
177 # cronet_static_small target has reduced binary size through using 181 # cronet_static_small target has reduced binary size through using
178 # ICU alternatives which requires file and ftp support be disabled. 182 # ICU alternatives which requires file and ftp support be disabled.
179 'target_name': 'cronet_static_small', 183 'target_name': 'cronet_static_small',
180 'type': 'static_library', 184 'type': 'static_library',
181 'defines': [ 185 'defines': [
182 'USE_PLATFORM_ICU_ALTERNATIVES=1', 186 'USE_PLATFORM_ICU_ALTERNATIVES=1',
183 'DISABLE_FILE_SUPPORT=1', 187 'DISABLE_FILE_SUPPORT=1',
184 'DISABLE_FTP_SUPPORT=1', 188 'DISABLE_FTP_SUPPORT=1',
185 ], 189 ],
186 'dependencies': [ 190 'dependencies': [
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 '<(SHARED_LIB_DIR)/<(native_lib)', 728 '<(SHARED_LIB_DIR)/<(native_lib)',
725 ], 729 ],
726 }, 730 },
727 ], 731 ],
728 }, 732 },
729 ], 733 ],
730 'variables': { 734 'variables': {
731 'enable_data_reduction_proxy_support%': 0, 735 'enable_data_reduction_proxy_support%': 0,
732 }, 736 },
733 }], # OS=="android" 737 }], # OS=="android"
738 ['OS=="ios"', {
739 'targets': [
740 {
741 'target_name': 'cronet_static',
742 'type': 'static_library',
743 'sources': [
744 'cronet/ios/cronet_bidirectional_stream.h',
745 'cronet/ios/cronet_bidirectional_stream.cc',
746 'cronet/ios/cronet_c_for_grpc.h',
747 'cronet/ios/cronet_c_for_grpc.cc',
748 'cronet/ios/cronet_engine.h',
749 'cronet/ios/cronet_engine.mm',
750 'cronet/ios/cronet_environment.cc',
751 'cronet/ios/cronet_environment.h',
752 'cronet/url_request_context_config.cc',
753 'cronet/url_request_context_config.h',
754 ],
755 'dependencies': [
756 'cronet_version_header',
757 '../base/base.gyp:base',
758 '../net/net.gyp:net',
759 ],
760 'cflags': [
761 '-DLOGGING=1',
762 '-fdata-sections',
763 '-ffunction-sections',
764 '-fno-rtti',
765 '-fvisibility=hidden',
766 '-fvisibility-inlines-hidden',
767 '-Wno-sign-promo',
768 '-Wno-missing-field-initializers',
769 ],
770 'ldflags': [
771 '-llog',
772 '-Wl,--gc-sections',
773 '-Wl,--exclude-libs,ALL'
774 ],
775 },
776 {
777 'target_name': 'libcronet',
778 'type': 'shared_library',
779 'sources': [
780 'cronet/ios/cronet_engine.h',
781 'cronet/ios/cronet_engine.mm',
782 ],
783 'dependencies': [
784 'cronet_static',
785 '../base/base.gyp:base',
786 ],
787 },
788 {
789 'target_name': 'cronet_test',
790 'type': 'executable',
791 'dependencies': [
792 'cronet_static',
793 '../net/net.gyp:net_quic_proto',
794 '../net/net.gyp:net_test_support',
795 '../net/net.gyp:simple_quic_tools',
796 '../testing/gtest.gyp:gtest',
797 ],
798 'sources': [
799 'cronet/ios/test/cronet_bidirectional_stream_test.mm',
800 'cronet/ios/test/cronet_test_runner.mm',
801 'cronet/ios/test/quic_test_server.cc',
802 'cronet/ios/test/quic_test_server.h',
803 ],
804 'mac_bundle_resources': [
805 '../net/data/ssl/certificates/quic_test.example.com.crt',
806 '../net/data/ssl/certificates/quic_test.example.com.key',
807 '../net/data/ssl/certificates/quic_test.example.com.key.pkcs8',
808 '../net/data/ssl/certificates/quic_test.example.com.key.sct',
809 ],
810 'include_dirs': [
811 '..',
812 ],
813 # TODO(crbug.com/571217): Disabled warning-as-error option until
814 # this bug is fixed.
815 'xcode_settings': {
816 'WARNING_CFLAGS': [
817 '-Wno-deprecated-declarations',
818 ],
819 },
820 },
821 {
822 # Build this target to package a standalone Cronet in a single
823 # .a file.
824 'target_name': 'cronet_package',
825 'type': 'none',
826 'variables' : {
827 'package_dir': '<(PRODUCT_DIR)/cronet',
828 },
829 'dependencies': [
830 # Depend on the dummy target so that all of CrNet's dependencies
831 # are built before packaging.
832 'libcronet',
833 ],
834 'actions': [
835 {
836 'action_name': 'Package Cronet',
837 'variables': {
838 'tool_path':
839 'cronet/tools/link_dependencies.py',
840 },
841 # Actions need an inputs list, even if it's empty.
842 'inputs': [
843 '<(tool_path)',
844 '<(PRODUCT_DIR)/libcronet.dylib',
845 ],
846 # Only specify one output, since this will be libtool's output.
847 'outputs': [ '<(package_dir)/libcronet_standalone.a' ],
848 'action': ['<(tool_path)',
849 '<(PRODUCT_DIR)',
850 'libcronet.dylib',
851 '<@(_outputs)',
852 ],
853 },
854 ],
855 'copies': [
856 {
857 'destination': '<(package_dir)',
858 'files': [
859 '../chrome/VERSION',
860 # TODO(mef): Strip debug symbols using "strip -u -r ..."
861 '<(PRODUCT_DIR)/libboringssl.a',
862 '<(PRODUCT_DIR)/libcronet_static.a',
863 '<(PRODUCT_DIR)/libcronet.dylib',
864 'cronet/ios/cronet_c_for_grpc.h',
865 'cronet/ios/cronet_engine.h',
866 'cronet/ios/cronet_environment.h',
867 ],
868 },
869 {
870 'destination': '<(package_dir)/test',
871 'files': [
872 'cronet/ios/test/cronet_bidirectional_stream_test.mm',
873 'cronet/ios/test/cronet_test_runner.mm',
874 ],
875 },
876 ],
877 },
878 ],
879 }], # OS=="ios"
734 ], 880 ],
735 } 881 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/ios/cronet_bidirectional_stream.h » ('j') | components/cronet/ios/cronet_engine.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698