Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit ea4dc7d

Browse files
srl295trevnorris
authored andcommitted
build: i18n: fix icu toolset dependencies
So what I did here is to make the icutools library actually contain the entire ICU dependencies needed for host-side tools. Sadly, this will build ICU twice, but avoids conflicts between host and target side. This all seems like a gyp bug of some sort, but without docs for toolsets, who’s to say? I removed the icuio library as a separate target, because it was only used by the host-side tools. PR-URL: #8681 Reviewed-by: Trevor Norris <[email protected]>
1 parent 0339446 commit ea4dc7d

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

tools/icu/icu-generic.gyp

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
{
9494
'target_name': 'icui18n',
9595
'type': '<(library)',
96-
'toolsets': [ 'host', 'target' ],
96+
'toolsets': [ 'target' ],
9797
'sources': [
9898
'<@(icu_src_i18n)'
9999
],
@@ -111,28 +111,6 @@
111111
},
112112
'export_dependent_settings': [ 'icuucx' ],
113113
},
114-
# this library is only built for derb..
115-
{
116-
'target_name': 'icuio',
117-
'type': '<(library)',
118-
'toolsets': [ 'host' ],
119-
'sources': [
120-
'<@(icu_src_io)'
121-
],
122-
'include_dirs': [
123-
'../../deps/icu/source/io',
124-
],
125-
'defines': [
126-
'U_IO_IMPLEMENTATION=1',
127-
],
128-
'dependencies': [ 'icuucx', 'icui18n', 'icu_implementation', 'icu_uconfig' ],
129-
'direct_dependent_settings': {
130-
'include_dirs': [
131-
'../../deps/icu/source/io',
132-
],
133-
},
134-
'export_dependent_settings': [ 'icuucx', 'icui18n' ],
135-
},
136114
# This exports actual ICU data
137115
{
138116
'target_name': 'icudata',
@@ -291,7 +269,7 @@
291269
{
292270
'target_name': 'icustubdata',
293271
'type': '<(library)',
294-
'toolsets': [ 'host', 'target' ],
272+
'toolsets': [ 'target' ],
295273
'dependencies': [ 'icu_implementation' ],
296274
'sources': [
297275
'<@(icu_src_stubdata)'
@@ -316,7 +294,7 @@
316294
'target_name': 'icuucx',
317295
'type': '<(library)',
318296
'dependencies': [ 'icu_implementation', 'icu_uconfig' ],
319-
'toolsets': [ 'host', 'target' ],
297+
'toolsets': [ 'target' ],
320298
'sources': [
321299
'<@(icu_src_common)'
322300
],
@@ -345,31 +323,51 @@
345323
'target_name': 'icutools',
346324
'type': '<(library)',
347325
'toolsets': [ 'host' ],
348-
'dependencies': [ 'icuucx', 'icui18n', 'icustubdata' ],
326+
'dependencies': [ 'icu_implementation', 'icu_uconfig' ],
349327
'sources': [
350-
'<@(icu_src_tools)'
328+
'<@(icu_src_tools)',
329+
'<@(icu_src_common)',
330+
'<@(icu_src_i18n)',
331+
'<@(icu_src_io)',
332+
'<@(icu_src_stubdata)',
351333
],
352334
'include_dirs': [
335+
'../../deps/icu/source/common',
336+
'../../deps/icu/source/i18n',
337+
'../../deps/icu/source/io',
353338
'../../deps/icu/source/tools/toolutil',
354339
],
355340
'defines': [
341+
'U_COMMON_IMPLEMENTATION=1',
342+
'U_I18N_IMPLEMENTATION=1',
343+
'U_IO_IMPLEMENTATION=1',
356344
'U_TOOLUTIL_IMPLEMENTATION=1',
357345
#'DEBUG=0', # http://bugs.icu-project.org/trac/ticket/10977
358346
],
359347
'direct_dependent_settings': {
360348
'include_dirs': [
349+
'../../deps/icu/source/common',
350+
'../../deps/icu/source/i18n',
351+
'../../deps/icu/source/io',
361352
'../../deps/icu/source/tools/toolutil',
362353
],
354+
'conditions': [
355+
[ 'OS=="win"', {
356+
'link_settings': {
357+
'libraries': [ '-lAdvAPI32.Lib', '-lUser32.lib' ],
358+
},
359+
}],
360+
],
363361
},
364-
'export_dependent_settings': [ 'icuucx', 'icui18n', 'icustubdata' ],
362+
'export_dependent_settings': [ 'icu_implementation', 'icu_uconfig' ],
365363
},
366364
# This tool is needed to rebuild .res files from .txt,
367365
# or to build index (res_index.txt) files for small-icu
368366
{
369367
'target_name': 'genrb',
370368
'type': 'executable',
371369
'toolsets': [ 'host' ],
372-
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ],
370+
'dependencies': [ 'icutools' ],
373371
'sources': [
374372
'<@(icu_src_genrb)'
375373
],
@@ -385,7 +383,7 @@
385383
'target_name': 'iculslocs',
386384
'toolsets': [ 'host' ],
387385
'type': 'executable',
388-
'dependencies': [ 'icutools', 'icuucx', 'icui18n', 'icuio' ],
386+
'dependencies': [ 'icutools' ],
389387
'sources': [
390388
'iculslocs.cc',
391389
'no-op.cc',
@@ -397,7 +395,7 @@
397395
'target_name': 'icupkg',
398396
'toolsets': [ 'host' ],
399397
'type': 'executable',
400-
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ],
398+
'dependencies': [ 'icutools' ],
401399
'sources': [
402400
'<@(icu_src_icupkg)',
403401
'no-op.cc',
@@ -408,7 +406,7 @@
408406
'target_name': 'genccode',
409407
'toolsets': [ 'host' ],
410408
'type': 'executable',
411-
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ],
409+
'dependencies': [ 'icutools' ],
412410
'sources': [
413411
'<@(icu_src_genccode)',
414412
'no-op.cc',

0 commit comments

Comments
 (0)