diff options
author | Andy McFadden <fadden@android.com> | 2012-01-20 14:13:31 -0800 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2012-01-20 14:13:31 -0800 |
commit | 1f504c8a04a1ca4131bcfa57c5080b3702224a25 (patch) | |
tree | f435c9fef69ee0eb38fbf9a433c8c407c5605cdd /NativeCode.mk | |
parent | 4147917774389b6cec32731e58f7a96047cffad5 (diff) | |
download | libcore-1f504c8a04a1ca4131bcfa57c5080b3702224a25.zip libcore-1f504c8a04a1ca4131bcfa57c5080b3702224a25.tar.gz libcore-1f504c8a04a1ca4131bcfa57c5080b3702224a25.tar.bz2 |
Restrict -fvisibility-inlines-hidden to C++ code
gcc objects to using -fvisibility-inlines-hidden with C code:
cc1: error: command line option "-fvisibility-inlines-hidden"
is valid for C++/ObjC++ but not for C
Move it from CFLAGS to CPPFLAGS.
Change-Id: I151530748b0d083d8edb50df94db23d101ad01c6
Diffstat (limited to 'NativeCode.mk')
-rw-r--r-- | NativeCode.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/NativeCode.mk b/NativeCode.mk index f17e14a..7c6dbfc 100644 --- a/NativeCode.mk +++ b/NativeCode.mk @@ -78,8 +78,9 @@ $(foreach dir, \ core_c_includes := $(sort libcore/include $(LOCAL_C_INCLUDES) $(JNI_H_INCLUDE)) core_shared_libraries := $(sort $(LOCAL_SHARED_LIBRARIES)) core_static_libraries := $(sort $(LOCAL_STATIC_LIBRARIES)) -core_cflags := -fvisibility=hidden -fvisibility-inlines-hidden +core_cflags := -fvisibility=hidden core_cflags += '-DGCC_HIDDEN=__attribute__((visibility("hidden")))' +core_cppflags := -fvisibility-inlines-hidden # @@ -90,6 +91,7 @@ include $(CLEAR_VARS) LOCAL_CFLAGS += -Wall -Wextra -Werror LOCAL_CFLAGS += $(core_cflags) +LOCAL_CPPFLAGS += $(core_cppflags) ifeq ($(TARGET_ARCH),arm) # Ignore "note: the mangling of 'va_list' has changed in GCC 4.4" LOCAL_CFLAGS += -Wno-psabi @@ -117,6 +119,7 @@ ifeq ($(WITH_HOST_DALVIK),true) # Define the rules. LOCAL_SRC_FILES := $(core_src_files) LOCAL_CFLAGS += $(core_cflags) + LOCAL_CPPFLAGS += $(core_cppflags) LOCAL_C_INCLUDES := $(core_c_includes) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libjavacore-host |