Bug 864843 - Part 3. Add build config of ICU for Android r=glandium
authorFabrice Desré <fabrice@mozilla.com>
Mon, 19 Oct 2015 22:25:44 -0700
changeset 268594 baa0579f8a9e3da08ed69a20f36e57c8e1a011b3
parent 268593 ba7fd2ff5fa098f0fd2a9c7d806d8f77e425a235
child 268595 6e34bc916ddacf20be1994f93d3b21e52183c341
push id66892
push userkwierso@gmail.com
push dateTue, 20 Oct 2015 22:28:42 +0000
treeherdermozilla-inbound@a407c3c5ec93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs864843
milestone44.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 864843 - Part 3. Add build config of ICU for Android r=glandium
build/autoconf/icu.m4
build/moz.build
config/external/icu/moz.build
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -94,23 +94,17 @@ if test -n "$USE_ICU"; then
         case "$OS_TARGET" in
             WINNT)
                 ICU_LIB_NAMES="icuin icuuc icudt"
                 MOZ_ICU_DBG_SUFFIX=
                 if test -n "$MOZ_DEBUG" -a -z "$MOZ_NO_DEBUG_RTL"; then
                     MOZ_ICU_DBG_SUFFIX=d
                 fi
                 ;;
-            Android)
-                if test -z "$gonkdir"; then
-                    AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
-                fi
-                ICU_LIB_NAMES="icui18n icuuc icudata"
-                ;;
-            Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD|GNU/kFreeBSD|SunOS)
+            Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD|GNU/kFreeBSD|SunOS|Android)
                 ICU_LIB_NAMES="icui18n icuuc icudata"
                 ;;
             *)
                 AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
         esac
     fi
 fi
 
@@ -274,16 +268,18 @@ if test -z "$BUILDING_JS" -o -n "$JS_STA
             if test -z "$MOZ_OPTIMIZE"; then
                 ICU_CFLAGS="$ICU_CFLAGS -Od"
                 ICU_CXXFLAGS="$ICU_CXXFLAGS -Od"
             fi
         fi
 
         if test -n "$gonkdir"; then
             ICU_CXXFLAGS="-I$gonkdir/abi/cpp/include $ICU_CXXFLAGS"
+        elif test "$OS_TARGET" = Android -a "$MOZ_ANDROID_CXX_STL" = mozstlport; then
+            ICU_CXXFLAGS="-I$_topsrcdir/build/gabi++/include $ICU_CXXFLAGS"
         fi
 
         if test -z "$MOZ_SHARED_ICU"; then
           ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_STATIC_IMPLEMENTATION"
           ICU_CFLAGS="$ICU_CFLAGS -DU_STATIC_IMPLEMENTATION"
           if test "$GNU_CC"; then
             ICU_CFLAGS="$ICU_CFLAGS -fvisibility=hidden"
             ICU_CXXFLAGS="$ICU_CXXFLAGS -fvisibility=hidden"
--- a/build/moz.build
+++ b/build/moz.build
@@ -12,16 +12,18 @@ SPHINX_TREES['buildsystem'] = 'docs'
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['win32']
 else:
     DIRS += ['unix']
 
 if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_ANDROID_CXX_STL'] == 'mozstlport':
     DIRS += ['stlport']
+    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and CONFIG['ENABLE_INTL_API']:
+        DIRS += ['gabi++']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     DIRS += ['annotationProcessors']
     TEST_DIRS += [
         'mobile/sutagent/android',
         'mobile/sutagent/android/watcher',
         'mobile/sutagent/android/ffxcp',
         'mobile/sutagent/android/fencp',
--- a/config/external/icu/moz.build
+++ b/config/external/icu/moz.build
@@ -16,8 +16,12 @@ else:
             l,
             CONFIG['MOZ_ICU_DBG_SUFFIX']
         )]
 
     if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
         OS_LIBS += [
             'gabi++',
         ]
+    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and CONFIG['MOZ_ANDROID_CXX_STL'] == 'mozstlport':
+        USE_LIBS += [
+            'gabi++'
+        ]