Browse Source

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: https://github.com/joyent/node/pull/8681
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
v0.11.15-release
Steven R. Loomis 10 years ago
committed by Trevor Norris
parent
commit
ea4dc7d444
  1. 62
      tools/icu/icu-generic.gyp

62
tools/icu/icu-generic.gyp

@ -93,7 +93,7 @@
{ {
'target_name': 'icui18n', 'target_name': 'icui18n',
'type': '<(library)', 'type': '<(library)',
'toolsets': [ 'host', 'target' ], 'toolsets': [ 'target' ],
'sources': [ 'sources': [
'<@(icu_src_i18n)' '<@(icu_src_i18n)'
], ],
@ -111,28 +111,6 @@
}, },
'export_dependent_settings': [ 'icuucx' ], 'export_dependent_settings': [ 'icuucx' ],
}, },
# this library is only built for derb..
{
'target_name': 'icuio',
'type': '<(library)',
'toolsets': [ 'host' ],
'sources': [
'<@(icu_src_io)'
],
'include_dirs': [
'../../deps/icu/source/io',
],
'defines': [
'U_IO_IMPLEMENTATION=1',
],
'dependencies': [ 'icuucx', 'icui18n', 'icu_implementation', 'icu_uconfig' ],
'direct_dependent_settings': {
'include_dirs': [
'../../deps/icu/source/io',
],
},
'export_dependent_settings': [ 'icuucx', 'icui18n' ],
},
# This exports actual ICU data # This exports actual ICU data
{ {
'target_name': 'icudata', 'target_name': 'icudata',
@ -291,7 +269,7 @@
{ {
'target_name': 'icustubdata', 'target_name': 'icustubdata',
'type': '<(library)', 'type': '<(library)',
'toolsets': [ 'host', 'target' ], 'toolsets': [ 'target' ],
'dependencies': [ 'icu_implementation' ], 'dependencies': [ 'icu_implementation' ],
'sources': [ 'sources': [
'<@(icu_src_stubdata)' '<@(icu_src_stubdata)'
@ -316,7 +294,7 @@
'target_name': 'icuucx', 'target_name': 'icuucx',
'type': '<(library)', 'type': '<(library)',
'dependencies': [ 'icu_implementation', 'icu_uconfig' ], 'dependencies': [ 'icu_implementation', 'icu_uconfig' ],
'toolsets': [ 'host', 'target' ], 'toolsets': [ 'target' ],
'sources': [ 'sources': [
'<@(icu_src_common)' '<@(icu_src_common)'
], ],
@ -345,23 +323,43 @@
'target_name': 'icutools', 'target_name': 'icutools',
'type': '<(library)', 'type': '<(library)',
'toolsets': [ 'host' ], 'toolsets': [ 'host' ],
'dependencies': [ 'icuucx', 'icui18n', 'icustubdata' ], 'dependencies': [ 'icu_implementation', 'icu_uconfig' ],
'sources': [ 'sources': [
'<@(icu_src_tools)' '<@(icu_src_tools)',
'<@(icu_src_common)',
'<@(icu_src_i18n)',
'<@(icu_src_io)',
'<@(icu_src_stubdata)',
], ],
'include_dirs': [ 'include_dirs': [
'../../deps/icu/source/common',
'../../deps/icu/source/i18n',
'../../deps/icu/source/io',
'../../deps/icu/source/tools/toolutil', '../../deps/icu/source/tools/toolutil',
], ],
'defines': [ 'defines': [
'U_COMMON_IMPLEMENTATION=1',
'U_I18N_IMPLEMENTATION=1',
'U_IO_IMPLEMENTATION=1',
'U_TOOLUTIL_IMPLEMENTATION=1', 'U_TOOLUTIL_IMPLEMENTATION=1',
#'DEBUG=0', # http://bugs.icu-project.org/trac/ticket/10977 #'DEBUG=0', # http://bugs.icu-project.org/trac/ticket/10977
], ],
'direct_dependent_settings': { 'direct_dependent_settings': {
'include_dirs': [ 'include_dirs': [
'../../deps/icu/source/common',
'../../deps/icu/source/i18n',
'../../deps/icu/source/io',
'../../deps/icu/source/tools/toolutil', '../../deps/icu/source/tools/toolutil',
], ],
'conditions': [
[ 'OS=="win"', {
'link_settings': {
'libraries': [ '-lAdvAPI32.Lib', '-lUser32.lib' ],
},
}],
],
}, },
'export_dependent_settings': [ 'icuucx', 'icui18n', 'icustubdata' ], 'export_dependent_settings': [ 'icu_implementation', 'icu_uconfig' ],
}, },
# This tool is needed to rebuild .res files from .txt, # This tool is needed to rebuild .res files from .txt,
# or to build index (res_index.txt) files for small-icu # or to build index (res_index.txt) files for small-icu
@ -369,7 +367,7 @@
'target_name': 'genrb', 'target_name': 'genrb',
'type': 'executable', 'type': 'executable',
'toolsets': [ 'host' ], 'toolsets': [ 'host' ],
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ], 'dependencies': [ 'icutools' ],
'sources': [ 'sources': [
'<@(icu_src_genrb)' '<@(icu_src_genrb)'
], ],
@ -385,7 +383,7 @@
'target_name': 'iculslocs', 'target_name': 'iculslocs',
'toolsets': [ 'host' ], 'toolsets': [ 'host' ],
'type': 'executable', 'type': 'executable',
'dependencies': [ 'icutools', 'icuucx', 'icui18n', 'icuio' ], 'dependencies': [ 'icutools' ],
'sources': [ 'sources': [
'iculslocs.cc', 'iculslocs.cc',
'no-op.cc', 'no-op.cc',
@ -397,7 +395,7 @@
'target_name': 'icupkg', 'target_name': 'icupkg',
'toolsets': [ 'host' ], 'toolsets': [ 'host' ],
'type': 'executable', 'type': 'executable',
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ], 'dependencies': [ 'icutools' ],
'sources': [ 'sources': [
'<@(icu_src_icupkg)', '<@(icu_src_icupkg)',
'no-op.cc', 'no-op.cc',
@ -408,7 +406,7 @@
'target_name': 'genccode', 'target_name': 'genccode',
'toolsets': [ 'host' ], 'toolsets': [ 'host' ],
'type': 'executable', 'type': 'executable',
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ], 'dependencies': [ 'icutools' ],
'sources': [ 'sources': [
'<@(icu_src_genccode)', '<@(icu_src_genccode)',
'no-op.cc', 'no-op.cc',

Loading…
Cancel
Save