diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp index 419efb525fb..679f29a1b2b 100644 --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp @@ -103,72 +103,81 @@ }, { 'target_name': 'icui18n', - 'type': '<(library)', - 'toolsets': [ 'target' ], - 'sources': [ - '<@(icu_src_i18n)' - ], - 'conditions': [ - [ 'icu_ver_major == 54', { 'sources!': [ - ## Strip out the following for ICU 54 only. - ## add more conditions in the future? - ## if your compiler can dead-strip, this will - ## make ZERO difference to binary size. - ## Made ICU-specific for future-proofing. - - # alphabetic index - '../../deps/icu/source/i18n/alphaindex.cpp', - # BOCSU - # misc - '../../deps/icu/source/i18n/dtitvfmt.cpp', - '../../deps/icu/source/i18n/dtitvinf.cpp', - '../../deps/icu/source/i18n/dtitv_impl.h', - '../../deps/icu/source/i18n/quantityformatter.cpp', - '../../deps/icu/source/i18n/quantityformatter.h', - '../../deps/icu/source/i18n/regexcmp.cpp', - '../../deps/icu/source/i18n/regexcmp.h', - '../../deps/icu/source/i18n/regexcst.h', - '../../deps/icu/source/i18n/regeximp.cpp', - '../../deps/icu/source/i18n/regeximp.h', - '../../deps/icu/source/i18n/regexst.cpp', - '../../deps/icu/source/i18n/regexst.h', - '../../deps/icu/source/i18n/regextxt.cpp', - '../../deps/icu/source/i18n/regextxt.h', - '../../deps/icu/source/i18n/region.cpp', - '../../deps/icu/source/i18n/region_impl.h', - '../../deps/icu/source/i18n/reldatefmt.cpp', - '../../deps/icu/source/i18n/reldatefmt.h', - '../../deps/icu/source/i18n/measfmt.h', - '../../deps/icu/source/i18n/measfmt.cpp', - '../../deps/icu/source/i18n/scientificformathelper.cpp', - '../../deps/icu/source/i18n/tmunit.cpp', - '../../deps/icu/source/i18n/tmutamt.cpp', - '../../deps/icu/source/i18n/tmutfmt.cpp', - '../../deps/icu/source/i18n/uregex.cpp', - '../../deps/icu/source/i18n/uregexc.cpp', - '../../deps/icu/source/i18n/uregion.cpp', - '../../deps/icu/source/i18n/uspoof.cpp', - '../../deps/icu/source/i18n/uspoof_build.cpp', - '../../deps/icu/source/i18n/uspoof_conf.cpp', - '../../deps/icu/source/i18n/uspoof_conf.h', - '../../deps/icu/source/i18n/uspoof_impl.cpp', - '../../deps/icu/source/i18n/uspoof_impl.h', - '../../deps/icu/source/i18n/uspoof_wsconf.cpp', - '../../deps/icu/source/i18n/uspoof_wsconf.h', - ]}]], - 'include_dirs': [ - '../../deps/icu/source/i18n', - ], - 'defines': [ - 'U_I18N_IMPLEMENTATION=1', + 'toolsets': [ 'target', 'host' ], + 'conditions' : [ + ['_toolset=="target"', { + 'type': '<(library)', + 'sources': [ + '<@(icu_src_i18n)' + ], + 'conditions': [ + [ 'icu_ver_major == 54', { 'sources!': [ + ## Strip out the following for ICU 54 only. + ## add more conditions in the future? + ## if your compiler can dead-strip, this will + ## make ZERO difference to binary size. + ## Made ICU-specific for future-proofing. + + # alphabetic index + '../../deps/icu/source/i18n/alphaindex.cpp', + # BOCSU + # misc + '../../deps/icu/source/i18n/dtitvfmt.cpp', + '../../deps/icu/source/i18n/dtitvinf.cpp', + '../../deps/icu/source/i18n/dtitv_impl.h', + '../../deps/icu/source/i18n/quantityformatter.cpp', + '../../deps/icu/source/i18n/quantityformatter.h', + '../../deps/icu/source/i18n/regexcmp.cpp', + '../../deps/icu/source/i18n/regexcmp.h', + '../../deps/icu/source/i18n/regexcst.h', + '../../deps/icu/source/i18n/regeximp.cpp', + '../../deps/icu/source/i18n/regeximp.h', + '../../deps/icu/source/i18n/regexst.cpp', + '../../deps/icu/source/i18n/regexst.h', + '../../deps/icu/source/i18n/regextxt.cpp', + '../../deps/icu/source/i18n/regextxt.h', + '../../deps/icu/source/i18n/region.cpp', + '../../deps/icu/source/i18n/region_impl.h', + '../../deps/icu/source/i18n/reldatefmt.cpp', + '../../deps/icu/source/i18n/reldatefmt.h', + '../../deps/icu/source/i18n/measfmt.h', + '../../deps/icu/source/i18n/measfmt.cpp', + '../../deps/icu/source/i18n/scientificformathelper.cpp', + '../../deps/icu/source/i18n/tmunit.cpp', + '../../deps/icu/source/i18n/tmutamt.cpp', + '../../deps/icu/source/i18n/tmutfmt.cpp', + '../../deps/icu/source/i18n/uregex.cpp', + '../../deps/icu/source/i18n/uregexc.cpp', + '../../deps/icu/source/i18n/uregion.cpp', + '../../deps/icu/source/i18n/uspoof.cpp', + '../../deps/icu/source/i18n/uspoof_build.cpp', + '../../deps/icu/source/i18n/uspoof_conf.cpp', + '../../deps/icu/source/i18n/uspoof_conf.h', + '../../deps/icu/source/i18n/uspoof_impl.cpp', + '../../deps/icu/source/i18n/uspoof_impl.h', + '../../deps/icu/source/i18n/uspoof_wsconf.cpp', + '../../deps/icu/source/i18n/uspoof_wsconf.h', + ]}]], + 'include_dirs': [ + '../../deps/icu/source/i18n', + ], + 'defines': [ + 'U_I18N_IMPLEMENTATION=1', + ], + 'dependencies': [ 'icuucx', 'icu_implementation', 'icu_uconfig', 'icu_uconfig_target' ], + 'direct_dependent_settings': { + 'include_dirs': [ + '../../deps/icu/source/i18n', + ], + }, + 'export_dependent_settings': [ 'icuucx', 'icu_uconfig_target' ], + }], + ['_toolset=="host"', { + 'type': 'none', + 'dependencies': [ 'icutools' ], + 'export_dependent_settings': [ 'icutools' ], + }], ], - 'dependencies': [ 'icuucx', 'icu_implementation', 'icu_uconfig', 'icu_uconfig_target' ], - 'direct_dependent_settings': { - 'include_dirs': [ - '../../deps/icu/source/i18n', - ], - }, - 'export_dependent_settings': [ 'icuucx', 'icu_uconfig_target' ], }, # This exports actual ICU data { @@ -343,9 +352,17 @@ { 'target_name': 'icuuc', 'type': 'none', - 'toolsets': [ 'target' ], - 'dependencies': [ 'icuucx', 'icudata' ], - 'export_dependent_settings': [ 'icuucx', 'icudata' ], + 'toolsets': [ 'target', 'host' ], + 'conditions' : [ + ['_toolset=="host"', { + 'dependencies': [ 'icutools' ], + 'export_dependent_settings': [ 'icutools' ], + }], + ['_toolset=="target"', { + 'dependencies': [ 'icuucx', 'icudata' ], + 'export_dependent_settings': [ 'icuucx', 'icudata' ], + }], + ], }, # This is the 'real' icuuc. {