Skip to content

Commit

Permalink
build: i18n: fix icu toolset dependencies
Browse files Browse the repository at this point in the history
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: nodejs/node-v0.x-archive#8681
Reviewed-by: Trevor Norris <[email protected]>
  • Loading branch information
srl295 authored and trevnorris committed Nov 12, 2014
1 parent 0339446 commit ea4dc7d
Showing 1 changed file with 30 additions and 32 deletions.
62 changes: 30 additions & 32 deletions tools/icu/icu-generic.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
{
'target_name': 'icui18n',
'type': '<(library)',
'toolsets': [ 'host', 'target' ],
'toolsets': [ 'target' ],
'sources': [
'<@(icu_src_i18n)'
],
Expand All @@ -111,28 +111,6 @@
},
'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
{
'target_name': 'icudata',
Expand Down Expand Up @@ -291,7 +269,7 @@
{
'target_name': 'icustubdata',
'type': '<(library)',
'toolsets': [ 'host', 'target' ],
'toolsets': [ 'target' ],
'dependencies': [ 'icu_implementation' ],
'sources': [
'<@(icu_src_stubdata)'
Expand All @@ -316,7 +294,7 @@
'target_name': 'icuucx',
'type': '<(library)',
'dependencies': [ 'icu_implementation', 'icu_uconfig' ],
'toolsets': [ 'host', 'target' ],
'toolsets': [ 'target' ],
'sources': [
'<@(icu_src_common)'
],
Expand Down Expand Up @@ -345,31 +323,51 @@
'target_name': 'icutools',
'type': '<(library)',
'toolsets': [ 'host' ],
'dependencies': [ 'icuucx', 'icui18n', 'icustubdata' ],
'dependencies': [ 'icu_implementation', 'icu_uconfig' ],
'sources': [
'<@(icu_src_tools)'
'<@(icu_src_tools)',
'<@(icu_src_common)',
'<@(icu_src_i18n)',
'<@(icu_src_io)',
'<@(icu_src_stubdata)',
],
'include_dirs': [
'../../deps/icu/source/common',
'../../deps/icu/source/i18n',
'../../deps/icu/source/io',
'../../deps/icu/source/tools/toolutil',
],
'defines': [
'U_COMMON_IMPLEMENTATION=1',
'U_I18N_IMPLEMENTATION=1',
'U_IO_IMPLEMENTATION=1',
'U_TOOLUTIL_IMPLEMENTATION=1',
#'DEBUG=0', # http://bugs.icu-project.org/trac/ticket/10977
],
'direct_dependent_settings': {
'include_dirs': [
'../../deps/icu/source/common',
'../../deps/icu/source/i18n',
'../../deps/icu/source/io',
'../../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,
# or to build index (res_index.txt) files for small-icu
{
'target_name': 'genrb',
'type': 'executable',
'toolsets': [ 'host' ],
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_genrb)'
],
Expand All @@ -385,7 +383,7 @@
'target_name': 'iculslocs',
'toolsets': [ 'host' ],
'type': 'executable',
'dependencies': [ 'icutools', 'icuucx', 'icui18n', 'icuio' ],
'dependencies': [ 'icutools' ],
'sources': [
'iculslocs.cc',
'no-op.cc',
Expand All @@ -397,7 +395,7 @@
'target_name': 'icupkg',
'toolsets': [ 'host' ],
'type': 'executable',
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_icupkg)',
'no-op.cc',
Expand All @@ -408,7 +406,7 @@
'target_name': 'genccode',
'toolsets': [ 'host' ],
'type': 'executable',
'dependencies': [ 'icutools', 'icuucx', 'icui18n' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_genccode)',
'no-op.cc',
Expand Down

0 comments on commit ea4dc7d

Please sign in to comment.