Bug 1001320. Part 5: Enable GCC visibility pragmas on Android. r=glandium
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 24 Apr 2014 14:51:42 +1200
changeset 182070 64c3eff5064a1806d705bf6c3be819f7b0dd3ba6
parent 182069 9641ef44e561f974a9b888349a7770d3d3afc1cb
child 182071 0f562f567aebc5be448272b4eb331c8df4cafc35
push id26745
push usercbook@mozilla.com
push dateThu, 08 May 2014 11:47:46 +0000
treeherdermozilla-central@2915a02d24cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1001320
milestone32.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 1001320. Part 5: Enable GCC visibility pragmas on Android. r=glandium
build/stlport/moz.build
configure.in
js/src/configure.in
--- a/build/stlport/moz.build
+++ b/build/stlport/moz.build
@@ -48,15 +48,16 @@ SOURCES += [
 
 DEFINES['_GNU_SOURCE'] = True
 
 LOCAL_INCLUDES += [
     'stlport',
 ]
 
 DISABLE_STL_WRAPPING = True
+NO_VISIBILITY_FLAGS = True
 
 # Suppress warnings in third-party code.
 if CONFIG['GNU_CXX']:
     CXXFLAGS += [
         '-Wno-empty-body',
         '-Wno-type-limits',
     ]
--- a/configure.in
+++ b/configure.in
@@ -2545,18 +2545,23 @@ MOZ_CXX11
 AC_LANG_C
 
 dnl Check for .hidden assembler directive and visibility attribute.
 dnl Borrowed from glibc configure.in
 dnl ===============================================================
 if test "$GNU_CC"; then
   AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
   AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
-  case "${OS_TARGET}" in
-  Darwin|Android)
+  if test -n "$gonkdir"; then
+    visibility_target=Gonk
+  else
+    visibility_target=$OS_TARGET
+  fi
+  case "$visibility_target" in
+  Darwin|Gonk)
     VISIBILITY_FLAGS='-fvisibility=hidden'
     ;;
   *)
     VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
     WRAP_SYSTEM_INCLUDES=1
     ;;
   esac
 fi         # GNU_CC
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2083,18 +2083,23 @@ AC_LANG_CPLUSPLUS
 MOZ_CXX11
 
 dnl Check for .hidden assembler directive and visibility attribute.
 dnl Borrowed from glibc configure.in
 dnl ===============================================================
 if test "$GNU_CC"; then
   AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
   AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
-  case "${OS_TARGET}" in
-  Darwin|Android)
+  if test -n "$gonkdir"; then
+    visibility_target=Gonk
+  else
+    visibility_target=$OS_TARGET
+  fi
+  case "$visibility_target" in
+  Darwin|Gonk)
     VISIBILITY_FLAGS='-fvisibility=hidden'
     ;;
   *)
     VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
     WRAP_SYSTEM_INCLUDES=1
     ;;
   esac
 fi         # GNU_CC