OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 # MAINTAINERS: | 5 # MAINTAINERS: |
6 # See the BUILD.gn file for more extensive comments and documentation. This | 6 # See the BUILD.gn file for more extensive comments and documentation. This |
7 # .gyp file exists only for compatibility with gyp. The variables defined below | 7 # .gyp file exists only for compatibility with gyp. The variables defined below |
8 # are used in equivalent targets in BUILD.GN. | 8 # are used in equivalent targets in BUILD.GN. |
9 | 9 |
10 { | 10 { |
11 'variables': { | 11 'variables': { |
12 'cld2_platform_support%': 'static', | |
13 | |
14 # These sources need to be included in both static and dynamic builds as | 12 # These sources need to be included in both static and dynamic builds as |
15 # well as the dynamic data tool. | 13 # well as the dynamic data tool. |
16 'cld2_core_sources': [ | 14 'cld2_core_sources': [ |
17 'src/internal/cld2tablesummary.h', | 15 'src/internal/cld2tablesummary.h', |
18 'src/internal/cldutil.h', | 16 'src/internal/cldutil.h', |
19 'src/internal/cldutil_shared.h', | 17 'src/internal/cldutil_shared.h', |
20 'src/internal/compact_lang_det_hint_code.h', | 18 'src/internal/compact_lang_det_hint_code.h', |
21 'src/internal/compact_lang_det_impl.h', | 19 'src/internal/compact_lang_det_impl.h', |
22 'src/internal/debug.h', | 20 'src/internal/debug.h', |
23 'src/internal/fixunicodevalue.h', | 21 'src/internal/fixunicodevalue.h', |
(...skipping 29 matching lines...) Expand all Loading... |
53 'src/internal/generated_language.cc', | 51 'src/internal/generated_language.cc', |
54 'src/internal/generated_ulscript.cc', | 52 'src/internal/generated_ulscript.cc', |
55 'src/internal/getonescriptspan.cc', | 53 'src/internal/getonescriptspan.cc', |
56 'src/internal/lang_script.cc', | 54 'src/internal/lang_script.cc', |
57 'src/internal/offsetmap.cc', | 55 'src/internal/offsetmap.cc', |
58 'src/internal/scoreonescriptspan.cc', | 56 'src/internal/scoreonescriptspan.cc', |
59 'src/internal/tote.cc', | 57 'src/internal/tote.cc', |
60 'src/internal/utf8statetable.cc', | 58 'src/internal/utf8statetable.cc', |
61 ], | 59 ], |
62 | 60 |
63 # These sources are needed for a dynamic build to load data at runtime. | |
64 'cld2_dynamic_data_loader_sources': [ | |
65 'src/internal/cld2_dynamic_data.h', | |
66 'src/internal/cld2_dynamic_data.cc', | |
67 'src/internal/cld2_dynamic_data_loader.h', | |
68 'src/internal/cld2_dynamic_data_loader.cc', | |
69 ], | |
70 | |
71 # These sources are for both small-table and large-table data sets. | 61 # These sources are for both small-table and large-table data sets. |
72 'cld2_data_sources': [ | 62 'cld2_data_sources': [ |
73 'src/internal/cld2_generated_cjk_compatible.cc', | 63 'src/internal/cld2_generated_cjk_compatible.cc', |
74 'src/internal/cld2_generated_deltaoctachrome.cc', | 64 'src/internal/cld2_generated_deltaoctachrome.cc', |
75 'src/internal/cld2_generated_distinctoctachrome.cc', | 65 'src/internal/cld2_generated_distinctoctachrome.cc', |
76 'src/internal/cld_generated_cjk_delta_bi_4.cc', | 66 'src/internal/cld_generated_cjk_delta_bi_4.cc', |
77 'src/internal/cld_generated_cjk_uni_prop_80.cc', | 67 'src/internal/cld_generated_cjk_uni_prop_80.cc', |
78 'src/internal/cld_generated_score_quad_octa_2.cc', | 68 'src/internal/cld_generated_score_quad_octa_2.cc', |
79 'src/internal/generated_distinct_bi_0.cc', | 69 'src/internal/generated_distinct_bi_0.cc', |
80 ], | 70 ], |
81 | 71 |
82 # Used when cld2_table_size == 0 (small tables) | 72 # Used when cld2_table_size == 0 (small tables) |
83 # See 'cld2_table_size' in build/common.gypi for more information. | 73 # See 'cld2_table_size' in build/common.gypi for more information. |
84 'cld2_data_smallest_sources': [ | 74 'cld2_data_smallest_sources': [ |
85 'src/internal/cld2_generated_quadchrome_16.cc' | 75 'src/internal/cld2_generated_quadchrome_16.cc' |
86 ], | 76 ], |
87 | 77 |
88 # Used when cld2_table_size == 2 (large tables) | 78 # Used when cld2_table_size == 2 (large tables) |
89 # See 'cld2_table_size' in build/common.gypi for more information. | 79 # See 'cld2_table_size' in build/common.gypi for more information. |
90 'cld2_data_largest_sources': [ | 80 'cld2_data_largest_sources': [ |
91 'src/internal/cld2_generated_quadchrome_2.cc' | 81 'src/internal/cld2_generated_quadchrome_2.cc' |
92 ], | 82 ], |
93 }, | 83 }, |
94 | 84 |
95 'targets': [ | 85 'targets': [ |
96 { | 86 { |
97 # GN version: //third_party/cld_2:cld_2_dynamic_data_tool | |
98 'target_name': 'cld_2_dynamic_data_tool', | |
99 'type': 'executable', | |
100 'include_dirs': [ | |
101 'src/internal', | |
102 'src/public', | |
103 ], | |
104 | |
105 'sources': [ | |
106 # Note: sources list duplicated in GN build. | |
107 '<@(cld2_core_sources)', | |
108 '<@(cld2_core_impl_sources)', | |
109 '<@(cld2_data_sources)', | |
110 '<@(cld2_dynamic_data_loader_sources)', | |
111 'src/internal/cld2_dynamic_data_extractor.h', | |
112 'src/internal/cld2_dynamic_data_extractor.cc', | |
113 'src/internal/cld2_dynamic_data_tool.cc', | |
114 ], | |
115 'conditions': [ | |
116 ['OS=="win"', { | |
117 'msvs_disabled_warnings': [4267], # size_t -> int conversion. | |
118 }], | |
119 ['cld2_table_size==0', { | |
120 'sources+': ['<@(cld2_data_smallest_sources)'] | |
121 }], | |
122 ['cld2_table_size==2', { | |
123 'sources+': ['<@(cld2_data_largest_sources)'] | |
124 }], | |
125 ], | |
126 'defines': ['CLD2_DYNAMIC_MODE'], | |
127 'variables': { | |
128 'clang_warning_flags': [ | |
129 # The generated files don't have braces around subobject initializers. | |
130 '-Wno-missing-braces', | |
131 ], | |
132 }, | |
133 }, | |
134 | |
135 { | |
136 # GN version: //third_party/cld_2 | 87 # GN version: //third_party/cld_2 |
137 'target_name': 'cld_2', | 88 'target_name': 'cld_2', |
138 'type': 'none', | |
139 'sources': ['<@(cld2_core_sources)'], | |
140 'dependencies': [], | |
141 }, | |
142 | |
143 # As described above in the comments for cld2_platform_support, this is a | |
144 # passthrough target that allows high-level targets to depend upon the same | |
145 # CLD support as desired by the embedder. | |
146 { | |
147 # GN version: //third_party/cld_2:cld2_platform_impl | |
148 'target_name': 'cld2_platform_impl', | |
149 'type': 'none', | |
150 'dependencies': ['cld2_<(cld2_platform_support)'], | |
151 }, | |
152 | |
153 { | |
154 # GN version: //third_party/cld_2:cld2_static | |
155 'target_name': 'cld2_static', | |
156 'type': 'static_library', | 89 'type': 'static_library', |
157 'include_dirs': [ | 90 'include_dirs': [ |
158 'src/internal', | 91 'src/internal', |
159 'src/public', | 92 'src/public', |
160 ], | 93 ], |
161 'sources': [ | 94 'sources': [ |
162 '<@(cld2_core_sources)', | 95 '<@(cld2_core_sources)', |
163 '<@(cld2_core_impl_sources)', | 96 '<@(cld2_core_impl_sources)', |
164 '<@(cld2_data_sources)', | 97 '<@(cld2_data_sources)', |
165 ], | 98 ], |
(...skipping 11 matching lines...) Expand all Loading... |
177 'variables': { | 110 'variables': { |
178 'clang_warning_flags': [ | 111 'clang_warning_flags': [ |
179 # The generated files don't have braces around subobject initializers. | 112 # The generated files don't have braces around subobject initializers. |
180 '-Wno-missing-braces', | 113 '-Wno-missing-braces', |
181 # cld_2 contains unused private fields, | 114 # cld_2 contains unused private fields, |
182 # https://code.google.com/p/cld2/issues/detail?id=37 | 115 # https://code.google.com/p/cld2/issues/detail?id=37 |
183 '-Wno-unused-private-field', | 116 '-Wno-unused-private-field', |
184 ], | 117 ], |
185 }, | 118 }, |
186 }, | 119 }, |
187 | |
188 { | |
189 # GN version: //third_party/cld_2:cld2_dynamic | |
190 'target_name': 'cld2_dynamic', | |
191 'type': 'static_library', | |
192 'conditions': [ | |
193 ['OS=="win"', { | |
194 'msvs_disabled_warnings': [4267], # size_t -> int conversion. | |
195 }], | |
196 ], | |
197 'include_dirs': [ | |
198 'src/internal', | |
199 'src/public', | |
200 ], | |
201 'sources': [ | |
202 '<@(cld2_core_sources)', | |
203 '<@(cld2_core_impl_sources)', | |
204 '<@(cld2_dynamic_data_loader_sources)', | |
205 ], | |
206 'defines': ['CLD2_DYNAMIC_MODE'], | |
207 'variables': { | |
208 'clang_warning_flags': [ | |
209 # cld_2 contains unused private fields, | |
210 # https://code.google.com/p/cld2/issues/detail?id=37 | |
211 '-Wno-unused-private-field', | |
212 ], | |
213 }, | |
214 }, | |
215 ], | 120 ], |
216 } | 121 } |
OLD | NEW |