Backed out 4 changeset (bug 1284406) for build bustage on CLOSED TREE
authorXidorn Quan <me@upsuper.org>
Sat, 16 Jul 2016 12:27:45 +1000
changeset 345217 db8491cc618f73adf1778a0209877edcbebd4452
parent 345216 a73f1ed7dab078196d0d3da90859c68714520657
child 345218 cf2bb72412a04c4c67aac4b42762464d86fab642
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
Backed out 4 changeset (bug 1284406) for build bustage on CLOSED TREE
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
js/src/moz.build
layout/forms/moz.build
netwerk/dns/moz.build
old-configure.in
xpcom/build/moz.build
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -11,20 +11,21 @@ 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)
-    CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS"
-    CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS"
+else
+    MOZ_ICU_INCLUDES="/intl/icu/source/common /intl/icu/source/i18n"
 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 += ['/intl/icu/source/i18n']
+LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 
 include('../defs.mozbuild')
 include('sources.mozbuild')
--- a/config/external/icu/common/sources.mozbuild
+++ b/config/external/icu/common/sources.mozbuild
@@ -174,97 +174,8 @@ 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 += ['/intl/icu/source/common']
+LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 
 include('../defs.mozbuild')
 include('sources.mozbuild')
--- a/config/external/icu/i18n/sources.mozbuild
+++ b/config/external/icu/i18n/sources.mozbuild
@@ -194,92 +194,8 @@ 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,9 +5,11 @@
 # 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
@@ -95,17 +95,25 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['GNU_CC']:
     # Suppress gcc warning about a comparison being always false due to the
     # range of the data type
     SOURCES['Key.cpp'].flags += ['-Wno-error=type-limits']
     CXXFLAGS += ['-Wno-error=shadow']
 
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    CXXFLAGS += ['-wd4577']
+
 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,16 +231,19 @@ 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'
 
@@ -283,8 +286,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 DEFINES['GRAPHITE2_STATIC'] = True
 
 if CONFIG['CLANG_CXX']:
     # Suppress warnings from Skia header files.
     SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    CXXFLAGS += ['-wd4577']
--- a/intl/build/moz.build
+++ b/intl/build/moz.build
@@ -4,15 +4,17 @@
 # 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,50 +39,36 @@ 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 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):
+def write_sources(mozbuild, sources):
     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']:
-        base_path = mozpath.join(topsrcdir, 'intl/icu/source/%s' % d)
-        makefile = mozpath.join(base_path, 'Makefile.in')
+        makefile = mozpath.join(topsrcdir,
+                                'intl/icu/source/%s/Makefile.in' % d)
         mozbuild = mozpath.join(topsrcdir,
                                 'config/external/icu/%s/sources.mozbuild' % d)
         sources = [mozpath.relpath(s, topsrcdir)
                    for s in get_sources_from_makefile(makefile)]
-        headers = [mozpath.normsep(os.path.relpath(s, topsrcdir))
-                   for s in list_headers(mozpath.join(base_path, 'unicode'))]
-        write_sources(mozbuild, sources, headers)
+        write_sources(mozbuild, sources)
 
 
 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,11 +6,13 @@
 
 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,9 +13,19 @@ 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
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'noexcept' used with no exception handling mode specified;
+    # termination on exception is not guaranteed. Specify /EHsc
+    CXXFLAGS += ['-wd4577']
--- a/intl/unicharutil/util/moz.build
+++ b/intl/unicharutil/util/moz.build
@@ -35,11 +35,13 @@ 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/js/src/moz.build
+++ b/js/src/moz.build
@@ -726,16 +726,17 @@ if CONFIG['OS_ARCH'] == 'SunOS':
         'nsl',
         'socket',
     ]
 
 OS_LIBS += CONFIG['REALTIME_LIBS']
 
 CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
+LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 
 NO_EXPAND_LIBS = True
 
 DIST_INSTALL = True
 
 # Prepare self-hosted JS code for embedding
 GENERATED_FILES += ['selfhosted.out.h']
 selfhosted = GENERATED_FILES['selfhosted.out.h']
--- a/layout/forms/moz.build
+++ b/layout/forms/moz.build
@@ -47,10 +47,22 @@ 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']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # 'noexcept' used with no exception handling mode specified;
+    # termination on exception is not guaranteed. Specify /EHsc
+    CXXFLAGS += ['-wd4577']
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -63,16 +63,26 @@ 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']
+
+if CONFIG['_MSC_VER']:
+    # This is intended as a temporary hack to support building with VS2015.
+    # icu\source\common\unicode/ucasemap.h(93): warning C4577:
+    # 'noexcept' used with no exception handling mode specified;
+    # termination on exception is not guaranteed. Specify /EHsc from unified dns
+    CXXFLAGS += ['-wd4577']
--- a/old-configure.in
+++ b/old-configure.in
@@ -334,21 +334,16 @@ case "$target" in
             CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"
 
             # https://connect.microsoft.com/VisualStudio/feedback/details/888527/warnings-on-dbghelp-h
             # for dbghelp.h, imagehlp.h, and shobj.h
             # C4091: 'typedef ': ignored on left of '' when no variable is declared
             CFLAGS="$CFLAGS -wd4091"
             CXXFLAGS="$CXXFLAGS -wd4091"
 
-            # This is intended as a temporary hack to support building with VS2015.
-            # 'noexcept' used with no exception handling mode specified;
-            # termination on exception is not guaranteed. Specify /EHsc
-            CXXFLAGS="$CXXFLAGS -wd4577"
-
             if test -n "$WIN_UCRT_REDIST_DIR"; then
               if test ! -d "$WIN_UCRT_REDIST_DIR"; then
                 AC_MSG_ERROR([Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}])
               fi
               WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd -W`
             fi
             ;;
         esac
--- a/xpcom/build/moz.build
+++ b/xpcom/build/moz.build
@@ -95,8 +95,11 @@ 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']