Skip to content

Commit

Permalink
Bug 1001320. Part 5: Use #pragma GCC visibility on B2G. r=glandium
Browse files Browse the repository at this point in the history
--HG--
rename : config/gcc_hidden.h => config/gcc_hidden_dso_handle.h
extra : rebase_source : 600bf9dd51c88ea0cdea3db2e20ce8ab1de9f3fb
  • Loading branch information
rocallahan committed May 12, 2014
1 parent 5f5fc30 commit 76ebf97
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 32 deletions.
11 changes: 11 additions & 0 deletions config/gcc_hidden_dso_handle.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */

#ifdef __cplusplus
extern "C"
#endif
void *__dso_handle;

/* Begin all files as hidden visibility */
#pragma GCC visibility push(hidden)
14 changes: 3 additions & 11 deletions config/system-headers
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,6 @@ DriverServices.h
DriverSynchronization.h
DropInPanel.h
dvidef.h
#ifdef ANDROID
EffectApi.h
#endif
elf.h
endian.h
Entry.h
Expand Down Expand Up @@ -516,6 +513,8 @@ gtk/gtkprinter.h
gtk/gtkprintjob.h
gtk/gtkprintunixdialog.h
#ifdef ANDROID
gui/BufferQueue.h
gui/ConsumerBase.h
gui/GraphicBufferAlloc.h
gui/IConsumerListener.h
gui/IGraphicBufferAlloc.h
Expand All @@ -542,14 +541,6 @@ hlink.h
HTTPBase.h
#endif
ia64/sys/inline.h
#ifdef ANDROID
IAudioFlingerClient.h
IAudioFlinger.h
IAudioRecord.h
IAudioTrack.h
IEffect.h
IEffectClient.h
#endif
Icons.h
iconv.h
ieeefp.h
Expand Down Expand Up @@ -911,6 +902,7 @@ rpc/types.h
sane/sane.h
sane/sanei.h
sane/saneopts.h
sched.h
Scrap.h
Screen.h
Script.h
Expand Down
18 changes: 10 additions & 8 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2550,17 +2550,19 @@ dnl ===============================================================
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
if test -n "$gonkdir"; then
visibility_target=Gonk
else
visibility_target=$OS_TARGET
fi
case "$visibility_target" in
Darwin|Gonk)
case "$OS_TARGET" in
Darwin)
VISIBILITY_FLAGS='-fvisibility=hidden'
;;
*)
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
case $GCC_VERSION in
4.4*)
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden_dso_handle.h'
;;
*)
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
;;
esac
WRAP_SYSTEM_INCLUDES=1
;;
esac
Expand Down
4 changes: 4 additions & 0 deletions dom/system/gonk/android_audio/AudioSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef ANDROID_AUDIOSYSTEM_H_
#define ANDROID_AUDIOSYSTEM_H_

#pragma GCC visibility push(default)

#include <utils/RefBase.h>
#include <utils/threads.h>
#include "IAudioFlinger.h"
Expand Down Expand Up @@ -961,4 +963,6 @@ class AudioParameter {

}; // namespace android

#pragma GCC visibility pop

#endif /*ANDROID_AUDIOSYSTEM_H_*/
18 changes: 10 additions & 8 deletions js/src/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2083,17 +2083,19 @@ dnl ===============================================================
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
if test -n "$gonkdir"; then
visibility_target=Gonk
else
visibility_target=$OS_TARGET
fi
case "$visibility_target" in
Darwin|Gonk)
case "$OS_TARGET" in
Darwin)
VISIBILITY_FLAGS='-fvisibility=hidden'
;;
*)
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
case $GCC_VERSION in
4.4*)
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden_dso_handle.h'
;;
*)
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
;;
esac
WRAP_SYSTEM_INCLUDES=1
;;
esac
Expand Down
1 change: 1 addition & 0 deletions widget/gonk/GonkPermission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

#include <utils/Unicode.h>
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
Expand Down
3 changes: 2 additions & 1 deletion widget/gonk/nativewindow/GonkNativeWindowClientJB.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
#include <utils/threads.h>
#include <utils/KeyedVector.h>

#include "mozilla/Types.h"
#include "GonkBufferQueue.h"

struct ANativeWindow_Buffer;
struct MOZ_EXPORT ANativeWindow_Buffer;

namespace android {

Expand Down
3 changes: 2 additions & 1 deletion widget/gonk/nativewindow/GonkNativeWindowClientKK.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
#include <utils/threads.h>
#include <utils/KeyedVector.h>

#include "mozilla/Types.h"
#include "GonkBufferQueue.h"

struct ANativeWindow_Buffer;
struct MOZ_EXPORT ANativeWindow_Buffer;

namespace android {

Expand Down
7 changes: 4 additions & 3 deletions widget/gonk/nativewindow/IGonkGraphicBufferConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <binder/IInterface.h>
#include <ui/Rect.h>

#include "mozilla/Types.h"
#include "mozilla/layers/LayersSurfaces.h"

namespace mozilla {
Expand All @@ -39,9 +40,9 @@ class TextureClient;
namespace android {
// ----------------------------------------------------------------------------

class IConsumerListener;
class GraphicBuffer;
class Fence;
class MOZ_EXPORT IConsumerListener;
class MOZ_EXPORT GraphicBuffer;
class MOZ_EXPORT Fence;

class IGonkGraphicBufferConsumer : public IInterface {
typedef mozilla::layers::TextureClient TextureClient;
Expand Down

0 comments on commit 76ebf97

Please sign in to comment.