1 https://github.com/google/mozc/issues/490
3 --- a/src/base/absl.gyp
4 +++ b/src/base/absl.gyp
6 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 - 'absl_srcdir': '<(DEPTH)/third_party/abseil-cpp/absl',
11 - 'gen_absl_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/abseil-cpp/absl',
14 + ['use_system_abseil_cpp==0', {
16 + 'absl_srcdir': '<(DEPTH)/third_party/abseil-cpp/absl',
17 + 'gen_absl_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/abseil-cpp/absl',
23 'target_name': 'absl_base',
24 - 'type': 'static_library',
25 'toolsets': ['host', 'target'],
27 - '<(absl_srcdir)/base/internal/cycleclock.cc',
28 - '<(absl_srcdir)/base/internal/low_level_alloc.cc',
29 - '<(absl_srcdir)/base/internal/raw_logging.cc',
30 - '<(absl_srcdir)/base/internal/spinlock.cc',
31 - '<(absl_srcdir)/base/internal/spinlock_wait.cc',
32 - '<(absl_srcdir)/base/internal/sysinfo.cc',
33 - '<(absl_srcdir)/base/internal/thread_identity.cc',
34 - '<(absl_srcdir)/base/internal/throw_delegate.cc',
35 - '<(absl_srcdir)/base/internal/unscaledcycleclock.cc',
36 - '<(absl_srcdir)/container/internal/raw_hash_set.cc',
37 - '<(absl_srcdir)/hash/internal/city.cc',
38 - '<(absl_srcdir)/hash/internal/hash.cc',
40 - 'msvs_disabled_warnings': [
41 - # 'type' : forcing value to bool 'true' or 'false'
42 - # (performance warning)
43 - # http://msdn.microsoft.com/en-us/library/b6801kcy.aspx
46 + ['use_system_abseil_cpp==1', {
48 + 'all_dependent_settings': {
51 + '-labsl_base -labsl_city -labsl_hash -labsl_malloc_internal -labsl_raw_hash_set -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_throw_delegate',
56 + 'type': 'static_library',
59 + '<(absl_srcdir)/base/internal/cycleclock.cc',
60 + # libabsl_malloc_internal
61 + '<(absl_srcdir)/base/internal/low_level_alloc.cc',
62 + # libabsl_raw_logging_internal
63 + '<(absl_srcdir)/base/internal/raw_logging.cc',
65 + '<(absl_srcdir)/base/internal/spinlock.cc',
66 + # libabsl_spinlock_wait
67 + '<(absl_srcdir)/base/internal/spinlock_wait.cc',
69 + '<(absl_srcdir)/base/internal/sysinfo.cc',
70 + '<(absl_srcdir)/base/internal/thread_identity.cc',
71 + # libabsl_throw_delegate
72 + '<(absl_srcdir)/base/internal/throw_delegate.cc',
74 + '<(absl_srcdir)/base/internal/unscaledcycleclock.cc',
75 + # libabsl_raw_hash_set
76 + '<(absl_srcdir)/container/internal/raw_hash_set.cc',
78 + '<(absl_srcdir)/hash/internal/city.cc',
80 + '<(absl_srcdir)/hash/internal/hash.cc',
82 + 'msvs_disabled_warnings': [
83 + # 'type' : forcing value to bool 'true' or 'false'
84 + # (performance warning)
85 + # http://msdn.microsoft.com/en-us/library/b6801kcy.aspx
92 'target_name': 'absl_numeric',
93 - 'type': 'static_library',
94 'toolsets': ['host', 'target'],
96 - '<(absl_srcdir)/numeric/int128.cc',
101 + ['use_system_abseil_cpp==1', {
103 + 'all_dependent_settings': {
111 + 'type': 'static_library',
114 + '<(absl_srcdir)/numeric/int128.cc',
123 'target_name': 'absl_strings_internal',
124 - 'type': 'static_library',
125 'toolsets': ['host', 'target'],
127 - '<(absl_srcdir)/strings/internal/charconv_bigint.cc',
128 - '<(absl_srcdir)/strings/internal/charconv_parse.cc',
129 - '<(absl_srcdir)/strings/internal/escaping.cc',
130 - '<(absl_srcdir)/strings/internal/memutil.cc',
131 - '<(absl_srcdir)/strings/internal/str_format/arg.cc',
132 - '<(absl_srcdir)/strings/internal/str_format/bind.cc',
133 - '<(absl_srcdir)/strings/internal/str_format/extension.cc',
134 - '<(absl_srcdir)/strings/internal/str_format/float_conversion.cc',
135 - '<(absl_srcdir)/strings/internal/str_format/output.cc',
136 - '<(absl_srcdir)/strings/internal/str_format/parser.cc',
137 - '<(absl_srcdir)/strings/internal/utf8.cc',
143 + ['use_system_abseil_cpp==1', {
145 + 'all_dependent_settings': {
148 + '-labsl_strings_internal',
153 + 'type': 'static_library',
156 + '<(absl_srcdir)/strings/internal/charconv_bigint.cc',
157 + '<(absl_srcdir)/strings/internal/charconv_parse.cc',
158 + # libabsl_strings_internal
159 + '<(absl_srcdir)/strings/internal/escaping.cc',
161 + '<(absl_srcdir)/strings/internal/memutil.cc',
162 + # libabsl_str_format_internal
163 + '<(absl_srcdir)/strings/internal/str_format/arg.cc',
164 + '<(absl_srcdir)/strings/internal/str_format/bind.cc',
165 + '<(absl_srcdir)/strings/internal/str_format/extension.cc',
166 + '<(absl_srcdir)/strings/internal/str_format/float_conversion.cc',
167 + '<(absl_srcdir)/strings/internal/str_format/output.cc',
168 + '<(absl_srcdir)/strings/internal/str_format/parser.cc',
169 + # libabsl_strings_internal
170 + '<(absl_srcdir)/strings/internal/utf8.cc',
180 'target_name': 'absl_strings',
181 - 'type': 'static_library',
182 'toolsets': ['host', 'target'],
184 - '<(absl_srcdir)/strings/ascii.cc',
185 - '<(absl_srcdir)/strings/charconv.cc',
186 - '<(absl_srcdir)/strings/escaping.cc',
187 - '<(absl_srcdir)/strings/match.cc',
188 - '<(absl_srcdir)/strings/numbers.cc',
189 - '<(absl_srcdir)/strings/str_cat.cc',
190 - '<(absl_srcdir)/strings/str_replace.cc',
191 - '<(absl_srcdir)/strings/str_split.cc',
192 - '<(absl_srcdir)/strings/string_view.cc',
193 - '<(absl_srcdir)/strings/substitute.cc',
198 - 'absl_strings_internal',
200 + ['use_system_abseil_cpp==1', {
202 + 'all_dependent_settings': {
205 + '-labsl_str_format_internal -labsl_strings -labsl_strings_internal',
210 + 'type': 'static_library',
213 + '<(absl_srcdir)/strings/ascii.cc',
214 + '<(absl_srcdir)/strings/charconv.cc',
215 + '<(absl_srcdir)/strings/escaping.cc',
216 + '<(absl_srcdir)/strings/match.cc',
217 + '<(absl_srcdir)/strings/numbers.cc',
218 + '<(absl_srcdir)/strings/str_cat.cc',
219 + '<(absl_srcdir)/strings/str_replace.cc',
220 + '<(absl_srcdir)/strings/str_split.cc',
221 + '<(absl_srcdir)/strings/string_view.cc',
222 + '<(absl_srcdir)/strings/substitute.cc',
227 + 'absl_strings_internal',
233 'target_name': 'absl_time',
234 - 'type': 'static_library',
235 'toolsets': ['host', 'target'],
237 - '<(absl_srcdir)/time/civil_time.cc',
238 - '<(absl_srcdir)/time/clock.cc',
239 - '<(absl_srcdir)/time/duration.cc',
240 - '<(absl_srcdir)/time/format.cc',
241 - '<(absl_srcdir)/time/time.cc',
242 - '<(absl_srcdir)/time/internal/cctz/src/civil_time_detail.cc',
243 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_fixed.cc',
244 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_format.cc',
245 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_if.cc',
246 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_impl.cc',
247 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_info.cc',
248 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_libc.cc',
249 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_lookup.cc',
250 - '<(absl_srcdir)/time/internal/cctz/src/time_zone_posix.cc',
251 - '<(absl_srcdir)/time/internal/cctz/src/zone_info_source.cc',
259 - 'absl_strings_internal',
261 + ['use_system_abseil_cpp==1', {
263 + 'all_dependent_settings': {
266 + '-labsl_civil_time -labsl_time -labsl_time_zone',
271 + 'type': 'static_library',
274 + '<(absl_srcdir)/time/civil_time.cc',
275 + '<(absl_srcdir)/time/clock.cc',
276 + '<(absl_srcdir)/time/duration.cc',
277 + '<(absl_srcdir)/time/format.cc',
278 + '<(absl_srcdir)/time/time.cc',
279 + # libabsl_civil_time
280 + '<(absl_srcdir)/time/internal/cctz/src/civil_time_detail.cc',
281 + # libabsl_time_zone
282 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_fixed.cc',
283 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_format.cc',
284 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_if.cc',
285 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_impl.cc',
286 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_info.cc',
287 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_libc.cc',
288 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_lookup.cc',
289 + '<(absl_srcdir)/time/internal/cctz/src/time_zone_posix.cc',
290 + '<(absl_srcdir)/time/internal/cctz/src/zone_info_source.cc',
298 + 'absl_strings_internal',
304 --- a/src/config/config_test.gyp
305 +++ b/src/config/config_test.gyp
307 'config_handler_test.cc',
310 + '../base/absl.gyp:absl_base',
311 '../testing/testing.gyp:gtest_main',
312 '../testing/testing.gyp:mozctest',
313 'config.gyp:config_handler',
315 'character_form_manager_test.cc',
318 + '../base/absl.gyp:absl_base',
319 '../testing/testing.gyp:gtest_main',
320 'config.gyp:character_form_manager',
322 --- a/src/gyp/common.gypi
323 +++ b/src/gyp/common.gypi
327 '<(SHARED_INTERMEDIATE_DIR)',
331 + ['use_system_abseil_cpp==0', {
337 'mac_framework_headers': [],
338 'target_conditions': [
339 --- a/src/gyp/common_win.gypi
340 +++ b/src/gyp/common_win.gypi
341 @@ -307,10 +307,16 @@
344 '<(SHARED_INTERMEDIATE_DIR)',
347 '<(wtl_dir)/include',
350 + ['use_system_abseil_cpp==0', {
356 'msvs_configuration_attributes': {
357 'CharacterSet': '<(win_char_set_unicode)',
359 --- a/src/gyp/defines.gypi
360 +++ b/src/gyp/defines.gypi
362 # use_libibus represents if ibus library is used or not.
363 # This option is only for Linux.
366 + # use_system_abseil_cpp represents if system version or bundled version
367 + # of abseil-cpp library is used.
368 + 'use_system_abseil_cpp%': '0',
372 --- a/src/gyp/directories.gypi
373 +++ b/src/gyp/directories.gypi
376 # Top directory of third party libraries.
377 'third_party_dir': '<(DEPTH)/third_party',
378 - 'absl_dir': '<(DEPTH)/third_party/abseil-cpp',
381 + ['use_system_abseil_cpp==0', {
382 + 'absl_dir': '<(DEPTH)/third_party/abseil-cpp',
386 # Top directory of additional third party libraries.
387 'ext_third_party_dir%': '<(abs_depth)/third_party',
388 --- a/src/session/session_test.gyp
389 +++ b/src/session/session_test.gyp
391 'internal/key_event_transformer_test.cc',
394 + '../base/absl.gyp:absl_base',
395 '../base/base.gyp:base',
396 '../converter/converter_base.gyp:converter_mock',
397 '../engine/engine.gyp:mock_converter_engine',
398 --- a/src/storage/storage_test.gyp
399 +++ b/src/storage/storage_test.gyp
401 'tiny_storage_test.cc',
404 + '../base/absl.gyp:absl_base',
405 '../testing/testing.gyp:gtest_main',
406 'storage.gyp:storage',