Bug 1284406 part 2 - Export ICU headers in include/unicode. r=glandium
authorXidorn Quan <me@upsuper.org>
Sat, 16 Jul 2016 11:44:15 +1000
changeset 305185 fcfaa7cf4118249e2b1ba8d13bd9f19bc26b11c5
parent 305184 b186c22ef65f7bb183d488e2133ad8641a862c36
child 305186 02a57d8120c4c9d474d1ae67b2514a707f30f17b
push id30633
push usercbook@mozilla.com
push dateSun, 17 Jul 2016 08:11:38 +0000
treeherderautoland@53900593419c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1284406
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1284406 part 2 - Export ICU headers in include/unicode. r=glandium MozReview-Commit-ID: FuwAgEGjhxm
build/autoconf/icu.m4
config/external/icu/common/moz.build
config/external/icu/common/sources.mozbuild
config/external/icu/i18n/moz.build
config/external/icu/i18n/sources.mozbuild
config/external/icu/stubdata/moz.build
dom/indexedDB/moz.build
gfx/thebes/moz.build
intl/build/moz.build
intl/icu_sources_data.py
intl/locale/mac/moz.build
intl/unicharutil/util/internal/moz.build
intl/unicharutil/util/moz.build
layout/forms/moz.build
netwerk/dns/moz.build
xpcom/build/moz.build
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -11,21 +11,20 @@ ICU_LIB_NAMES=
 MOZ_SYSTEM_ICU=
 MOZ_ARG_WITH_BOOL(system-icu,
 [  --with-system-icu
                           Use system ICU (located with pkgconfig)],
     MOZ_SYSTEM_ICU=1)
 
 if test -n "$MOZ_SYSTEM_ICU"; then
     PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
-else
-    MOZ_ICU_INCLUDES="/intl/icu/source/common /intl/icu/source/i18n"
+    CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS"
 fi
 
-AC_SUBST_LIST(MOZ_ICU_INCLUDES)
 AC_SUBST(MOZ_SYSTEM_ICU)
 
 MOZ_ARG_WITH_STRING(intl-api,
 [  --with-intl-api, --with-intl-api=build, --without-intl-api
     Determine the status of the ECMAScript Internationalization API.  The first
     (or lack of any of these) builds and exposes the API.  The second builds it
     but doesn't use ICU or expose the API to script.  The third doesn't build
     ICU at all.],
--- a/config/external/icu/common/moz.build
+++ b/config/external/icu/common/moz.build
@@ -12,12 +12,12 @@ if CONFIG['OS_TARGET'] == 'Android' and 
         'gabi++'
     ]
 
 DEFINES['U_COMMON_IMPLEMENTATION'] = True
 # This normally gets defined in the SDK but our WINVER is too low.
 #FIXME: should probably stop including mozilla-config.h
 DEFINES['LOCALE_SNAME'] = 0x5c
 
-LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
+LOCAL_INCLUDES += ['/intl/icu/source/i18n']
 
 include('../defs.mozbuild')
 include('sources.mozbuild')
--- a/config/external/icu/common/sources.mozbuild
+++ b/config/external/icu/common/sources.mozbuild
@@ -174,8 +174,97 @@ SOURCES += [
    '/intl/icu/source/common/utrie2_builder.cpp',
    '/intl/icu/source/common/uts46.cpp',
    '/intl/icu/source/common/utypes.c',
    '/intl/icu/source/common/uvector.cpp',
    '/intl/icu/source/common/uvectr32.cpp',
    '/intl/icu/source/common/uvectr64.cpp',
    '/intl/icu/source/common/wintz.c',
 ]
+
+EXPORTS.unicode += [
+   '/intl/icu/source/common/unicode/appendable.h',
+   '/intl/icu/source/common/unicode/brkiter.h',
+   '/intl/icu/source/common/unicode/bytestream.h',
+   '/intl/icu/source/common/unicode/bytestrie.h',
+   '/intl/icu/source/common/unicode/bytestriebuilder.h',
+   '/intl/icu/source/common/unicode/caniter.h',
+   '/intl/icu/source/common/unicode/chariter.h',
+   '/intl/icu/source/common/unicode/dbbi.h',
+   '/intl/icu/source/common/unicode/docmain.h',
+   '/intl/icu/source/common/unicode/dtintrv.h',
+   '/intl/icu/source/common/unicode/enumset.h',
+   '/intl/icu/source/common/unicode/errorcode.h',
+   '/intl/icu/source/common/unicode/filteredbrk.h',
+   '/intl/icu/source/common/unicode/icudataver.h',
+   '/intl/icu/source/common/unicode/icuplug.h',
+   '/intl/icu/source/common/unicode/idna.h',
+   '/intl/icu/source/common/unicode/listformatter.h',
+   '/intl/icu/source/common/unicode/localpointer.h',
+   '/intl/icu/source/common/unicode/locid.h',
+   '/intl/icu/source/common/unicode/messagepattern.h',
+   '/intl/icu/source/common/unicode/normalizer2.h',
+   '/intl/icu/source/common/unicode/normlzr.h',
+   '/intl/icu/source/common/unicode/parseerr.h',
+   '/intl/icu/source/common/unicode/parsepos.h',
+   '/intl/icu/source/common/unicode/platform.h',
+   '/intl/icu/source/common/unicode/ptypes.h',
+   '/intl/icu/source/common/unicode/putil.h',
+   '/intl/icu/source/common/unicode/rbbi.h',
+   '/intl/icu/source/common/unicode/rep.h',
+   '/intl/icu/source/common/unicode/resbund.h',
+   '/intl/icu/source/common/unicode/schriter.h',
+   '/intl/icu/source/common/unicode/std_string.h',
+   '/intl/icu/source/common/unicode/strenum.h',
+   '/intl/icu/source/common/unicode/stringpiece.h',
+   '/intl/icu/source/common/unicode/stringtriebuilder.h',
+   '/intl/icu/source/common/unicode/symtable.h',
+   '/intl/icu/source/common/unicode/ubidi.h',
+   '/intl/icu/source/common/unicode/ubrk.h',
+   '/intl/icu/source/common/unicode/ucasemap.h',
+   '/intl/icu/source/common/unicode/ucat.h',
+   '/intl/icu/source/common/unicode/uchar.h',
+   '/intl/icu/source/common/unicode/ucharstrie.h',
+   '/intl/icu/source/common/unicode/ucharstriebuilder.h',
+   '/intl/icu/source/common/unicode/uchriter.h',
+   '/intl/icu/source/common/unicode/uclean.h',
+   '/intl/icu/source/common/unicode/ucnv.h',
+   '/intl/icu/source/common/unicode/ucnv_cb.h',
+   '/intl/icu/source/common/unicode/ucnv_err.h',
+   '/intl/icu/source/common/unicode/ucnvsel.h',
+   '/intl/icu/source/common/unicode/uconfig.h',
+   '/intl/icu/source/common/unicode/udata.h',
+   '/intl/icu/source/common/unicode/uenum.h',
+   '/intl/icu/source/common/unicode/uidna.h',
+   '/intl/icu/source/common/unicode/uiter.h',
+   '/intl/icu/source/common/unicode/ulistformatter.h',
+   '/intl/icu/source/common/unicode/uloc.h',
+   '/intl/icu/source/common/unicode/umachine.h',
+   '/intl/icu/source/common/unicode/umisc.h',
+   '/intl/icu/source/common/unicode/unifilt.h',
+   '/intl/icu/source/common/unicode/unifunct.h',
+   '/intl/icu/source/common/unicode/unimatch.h',
+   '/intl/icu/source/common/unicode/uniset.h',
+   '/intl/icu/source/common/unicode/unistr.h',
+   '/intl/icu/source/common/unicode/unorm.h',
+   '/intl/icu/source/common/unicode/unorm2.h',
+   '/intl/icu/source/common/unicode/uobject.h',
+   '/intl/icu/source/common/unicode/urename.h',
+   '/intl/icu/source/common/unicode/urep.h',
+   '/intl/icu/source/common/unicode/ures.h',
+   '/intl/icu/source/common/unicode/uscript.h',
+   '/intl/icu/source/common/unicode/uset.h',
+   '/intl/icu/source/common/unicode/usetiter.h',
+   '/intl/icu/source/common/unicode/ushape.h',
+   '/intl/icu/source/common/unicode/usprep.h',
+   '/intl/icu/source/common/unicode/ustring.h',
+   '/intl/icu/source/common/unicode/ustringtrie.h',
+   '/intl/icu/source/common/unicode/utext.h',
+   '/intl/icu/source/common/unicode/utf.h',
+   '/intl/icu/source/common/unicode/utf16.h',
+   '/intl/icu/source/common/unicode/utf32.h',
+   '/intl/icu/source/common/unicode/utf8.h',
+   '/intl/icu/source/common/unicode/utf_old.h',
+   '/intl/icu/source/common/unicode/utrace.h',
+   '/intl/icu/source/common/unicode/utypes.h',
+   '/intl/icu/source/common/unicode/uvernum.h',
+   '/intl/icu/source/common/unicode/uversion.h',
+]
--- a/config/external/icu/i18n/moz.build
+++ b/config/external/icu/i18n/moz.build
@@ -4,12 +4,12 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Library('icui18n')
 FINAL_LIBRARY = 'icu'
 
 DEFINES['U_I18N_IMPLEMENTATION'] = True
 
-LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
+LOCAL_INCLUDES += ['/intl/icu/source/common']
 
 include('../defs.mozbuild')
 include('sources.mozbuild')
--- a/config/external/icu/i18n/sources.mozbuild
+++ b/config/external/icu/i18n/sources.mozbuild
@@ -194,8 +194,92 @@ SOURCES += [
    '/intl/icu/source/i18n/vzone.cpp',
    '/intl/icu/source/i18n/windtfmt.cpp',
    '/intl/icu/source/i18n/winnmfmt.cpp',
    '/intl/icu/source/i18n/wintzimpl.cpp',
    '/intl/icu/source/i18n/zonemeta.cpp',
    '/intl/icu/source/i18n/zrule.cpp',
    '/intl/icu/source/i18n/ztrans.cpp',
 ]
+
+EXPORTS.unicode += [
+   '/intl/icu/source/i18n/unicode/alphaindex.h',
+   '/intl/icu/source/i18n/unicode/basictz.h',
+   '/intl/icu/source/i18n/unicode/calendar.h',
+   '/intl/icu/source/i18n/unicode/choicfmt.h',
+   '/intl/icu/source/i18n/unicode/coleitr.h',
+   '/intl/icu/source/i18n/unicode/coll.h',
+   '/intl/icu/source/i18n/unicode/compactdecimalformat.h',
+   '/intl/icu/source/i18n/unicode/curramt.h',
+   '/intl/icu/source/i18n/unicode/currpinf.h',
+   '/intl/icu/source/i18n/unicode/currunit.h',
+   '/intl/icu/source/i18n/unicode/datefmt.h',
+   '/intl/icu/source/i18n/unicode/dcfmtsym.h',
+   '/intl/icu/source/i18n/unicode/decimfmt.h',
+   '/intl/icu/source/i18n/unicode/dtfmtsym.h',
+   '/intl/icu/source/i18n/unicode/dtitvfmt.h',
+   '/intl/icu/source/i18n/unicode/dtitvinf.h',
+   '/intl/icu/source/i18n/unicode/dtptngen.h',
+   '/intl/icu/source/i18n/unicode/dtrule.h',
+   '/intl/icu/source/i18n/unicode/fieldpos.h',
+   '/intl/icu/source/i18n/unicode/fmtable.h',
+   '/intl/icu/source/i18n/unicode/format.h',
+   '/intl/icu/source/i18n/unicode/fpositer.h',
+   '/intl/icu/source/i18n/unicode/gender.h',
+   '/intl/icu/source/i18n/unicode/gregocal.h',
+   '/intl/icu/source/i18n/unicode/locdspnm.h',
+   '/intl/icu/source/i18n/unicode/measfmt.h',
+   '/intl/icu/source/i18n/unicode/measunit.h',
+   '/intl/icu/source/i18n/unicode/measure.h',
+   '/intl/icu/source/i18n/unicode/msgfmt.h',
+   '/intl/icu/source/i18n/unicode/numfmt.h',
+   '/intl/icu/source/i18n/unicode/numsys.h',
+   '/intl/icu/source/i18n/unicode/plurfmt.h',
+   '/intl/icu/source/i18n/unicode/plurrule.h',
+   '/intl/icu/source/i18n/unicode/rbnf.h',
+   '/intl/icu/source/i18n/unicode/rbtz.h',
+   '/intl/icu/source/i18n/unicode/regex.h',
+   '/intl/icu/source/i18n/unicode/region.h',
+   '/intl/icu/source/i18n/unicode/reldatefmt.h',
+   '/intl/icu/source/i18n/unicode/scientificnumberformatter.h',
+   '/intl/icu/source/i18n/unicode/search.h',
+   '/intl/icu/source/i18n/unicode/selfmt.h',
+   '/intl/icu/source/i18n/unicode/simpletz.h',
+   '/intl/icu/source/i18n/unicode/smpdtfmt.h',
+   '/intl/icu/source/i18n/unicode/sortkey.h',
+   '/intl/icu/source/i18n/unicode/stsearch.h',
+   '/intl/icu/source/i18n/unicode/tblcoll.h',
+   '/intl/icu/source/i18n/unicode/timezone.h',
+   '/intl/icu/source/i18n/unicode/tmunit.h',
+   '/intl/icu/source/i18n/unicode/tmutamt.h',
+   '/intl/icu/source/i18n/unicode/tmutfmt.h',
+   '/intl/icu/source/i18n/unicode/translit.h',
+   '/intl/icu/source/i18n/unicode/tzfmt.h',
+   '/intl/icu/source/i18n/unicode/tznames.h',
+   '/intl/icu/source/i18n/unicode/tzrule.h',
+   '/intl/icu/source/i18n/unicode/tztrans.h',
+   '/intl/icu/source/i18n/unicode/ucal.h',
+   '/intl/icu/source/i18n/unicode/ucol.h',
+   '/intl/icu/source/i18n/unicode/ucoleitr.h',
+   '/intl/icu/source/i18n/unicode/ucsdet.h',
+   '/intl/icu/source/i18n/unicode/ucurr.h',
+   '/intl/icu/source/i18n/unicode/udat.h',
+   '/intl/icu/source/i18n/unicode/udateintervalformat.h',
+   '/intl/icu/source/i18n/unicode/udatpg.h',
+   '/intl/icu/source/i18n/unicode/udisplaycontext.h',
+   '/intl/icu/source/i18n/unicode/ufieldpositer.h',
+   '/intl/icu/source/i18n/unicode/uformattable.h',
+   '/intl/icu/source/i18n/unicode/ugender.h',
+   '/intl/icu/source/i18n/unicode/uldnames.h',
+   '/intl/icu/source/i18n/unicode/ulocdata.h',
+   '/intl/icu/source/i18n/unicode/umsg.h',
+   '/intl/icu/source/i18n/unicode/unirepl.h',
+   '/intl/icu/source/i18n/unicode/unum.h',
+   '/intl/icu/source/i18n/unicode/unumsys.h',
+   '/intl/icu/source/i18n/unicode/upluralrules.h',
+   '/intl/icu/source/i18n/unicode/uregex.h',
+   '/intl/icu/source/i18n/unicode/uregion.h',
+   '/intl/icu/source/i18n/unicode/usearch.h',
+   '/intl/icu/source/i18n/unicode/uspoof.h',
+   '/intl/icu/source/i18n/unicode/utmscale.h',
+   '/intl/icu/source/i18n/unicode/utrans.h',
+   '/intl/icu/source/i18n/unicode/vtzone.h',
+]
--- a/config/external/icu/stubdata/moz.build
+++ b/config/external/icu/stubdata/moz.build
@@ -5,11 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This builds the ICU stubdata library, since we are shipping ICU
 # data in a separate data file. ICU needs a data symbol to link against
 # even if you're loading its data from a file.
 
 Library('icustubdata')
 
-LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
-
 SOURCES += ['/intl/icu/source/stubdata/stubdata.c']
--- a/dom/indexedDB/moz.build
+++ b/dom/indexedDB/moz.build
@@ -104,12 +104,8 @@ LOCAL_INCLUDES += [
     '/db/sqlite3/src',
     '/dom/base',
     '/dom/storage',
     '/dom/workers',
     '/ipc/glue',
     '/xpcom/build',
     '/xpcom/threads',
 ]
-
-if CONFIG['ENABLE_INTL_API']:
-    CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -231,19 +231,16 @@ UNIFIED_SOURCES += [
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     UNIFIED_SOURCES += [
         'gfxMacPlatformFontList.mm',
     ]
 
 # We prefer to use ICU for normalization functions, but currently it is only
 # available if we're building with the Intl API enabled:
 if CONFIG['ENABLE_INTL_API']:
-    CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
     USE_LIBS += [
         'icu',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
--- a/intl/build/moz.build
+++ b/intl/build/moz.build
@@ -4,17 +4,15 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsI18nModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 LOCAL_INCLUDES += [
     '../locale',
     '../lwbrk',
     '../strres',
     '../uconv',
     '../unicharutil',
 ]
--- a/intl/icu_sources_data.py
+++ b/intl/icu_sources_data.py
@@ -39,36 +39,50 @@ def get_sources_from_makefile(makefile):
         if (isinstance(statement, SetVariable) and
                 statement.vnameexp.is_static_string and
                 statement.vnameexp.s == 'OBJECTS'):
             return sorted((find_source_file(srcdir, s)
                            for s in statement.value.split()),
                           key=lambda x: x.lower())
 
 
-def write_sources(mozbuild, sources):
+def list_headers(path):
+    result = []
+    for name in os.listdir(path):
+        f = mozpath.join(path, name)
+        if os.path.isfile(f):
+            result.append(f)
+    return sorted(result, key=lambda x: x.lower())
+
+
+def write_sources(mozbuild, sources, headers):
     with open(mozbuild, 'wb') as f:
         f.write('# THIS FILE IS GENERATED BY /intl/icu_sources_data.py ' +
                 'DO NOT EDIT\n' +
                 'SOURCES += [\n')
         f.write(''.join("   '/%s',\n" % s for s in sources))
+        f.write(']\n\n')
+        f.write('EXPORTS.unicode += [\n')
+        f.write(''.join("   '/%s',\n" % s for s in headers))
         f.write(']\n')
 
 
 def update_sources(topsrcdir):
     print('Updating ICU sources lists...')
     sys.path.append(mozpath.join(topsrcdir, 'build/pymake'))
     for d in ['common', 'i18n']:
-        makefile = mozpath.join(topsrcdir,
-                                'intl/icu/source/%s/Makefile.in' % d)
+        base_path = mozpath.join(topsrcdir, 'intl/icu/source/%s' % d)
+        makefile = mozpath.join(base_path, 'Makefile.in')
         mozbuild = mozpath.join(topsrcdir,
                                 'config/external/icu/%s/sources.mozbuild' % d)
         sources = [mozpath.relpath(s, topsrcdir)
                    for s in get_sources_from_makefile(makefile)]
-        write_sources(mozbuild, sources)
+        headers = [mozpath.normsep(os.path.relpath(s, topsrcdir))
+                   for s in list_headers(mozpath.join(base_path, 'unicode'))]
+        write_sources(mozbuild, sources, headers)
 
 
 def try_run(name, command, cwd=None, **kwargs):
     try:
         with tempfile.NamedTemporaryFile(prefix=name, delete=False) as f:
             subprocess.check_call(command, cwd=cwd, stdout=f,
                                 stderr=subprocess.STDOUT, **kwargs)
     except subprocess.CalledProcessError:
--- a/intl/locale/mac/moz.build
+++ b/intl/locale/mac/moz.build
@@ -6,13 +6,11 @@
 
 UNIFIED_SOURCES += [
     'nsCollationMacUC.cpp',
     'nsDateTimeFormatMac.cpp',
     'nsMacCharset.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 LOCAL_INCLUDES += [
     '..',
 ]
--- a/intl/unicharutil/util/internal/moz.build
+++ b/intl/unicharutil/util/internal/moz.build
@@ -13,13 +13,9 @@ include('../objs.mozbuild')
 UNIFIED_SOURCES += intl_unicharutil_util_cppsrcs
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '..',
 ]
 
-if CONFIG['ENABLE_INTL_API']:
-    CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
-
 DIST_INSTALL = True
--- a/intl/unicharutil/util/moz.build
+++ b/intl/unicharutil/util/moz.build
@@ -35,13 +35,11 @@ USE_STATIC_LIBS = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['_USE_ANSI_CPP'] = True
     # Don't include directives about which CRT to use
     CFLAGS += ['-Zl']
     CXXFLAGS += ['-Zl']
 
 if CONFIG['ENABLE_INTL_API']:
-    CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
     USE_LIBS += ['icu']
 
 DIST_INSTALL = True
--- a/layout/forms/moz.build
+++ b/layout/forms/moz.build
@@ -47,16 +47,10 @@ LOCAL_INCLUDES += [
     '../base',
     '../generic',
     '../style',
     '../xul',
     '/dom/base',
     '/dom/html',
 ]
 
-if CONFIG['ENABLE_INTL_API']:
-    # nsNumberControlFrame.cpp requires ICUUtils.h which in turn requires
-    # i18n/unum.h
-    CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
-
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -63,19 +63,16 @@ etld_data.inputs = ['effective_tld_names
 
 # need to include etld_data.inc
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
 if CONFIG['ENABLE_INTL_API']:
     DEFINES['IDNA2008'] = True
-    CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-    LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
     USE_LIBS += ['icu']
 else:
     UNIFIED_SOURCES += [
         'nameprep.c',
     ]
 
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']
--- a/xpcom/build/moz.build
+++ b/xpcom/build/moz.build
@@ -95,11 +95,8 @@ LOCAL_INCLUDES += [
 
 if CONFIG['MOZ_VPX']:
     LOCAL_INCLUDES += [
         '/media/libvpx',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     CXXFLAGS += CONFIG['TK_CFLAGS']
-
-CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
-LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']