From ccdd450b1284b73bee80a9709c864816cbfc1108 Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Mon, 23 Jul 2018 13:41:45 -0700 Subject: [PATCH] bump NDK toolchain to 4.9 (#19945) Summary: This PR will bump NDK_TOOLCHAIN_VERSION to 4.9 or use GCC 4.9 to build C++ code. Once merged, we can bump folly to a newer version, which requires GCC 4.9. Pull Request resolved: https://github.com/facebook/react-native/pull/19945 Reviewed By: fkgozali Differential Revision: D8943282 Pulled By: hramos fbshipit-source-id: d239ca67a08788b12e115a9d78443b13a10403f6 --- .../src/main/java/com/facebook/react/fabric/jsc/jni/BUCK | 2 +- ReactAndroid/src/main/jni/Application.mk | 3 ++- ReactAndroid/src/main/jni/first-party/fb/Android.mk | 2 +- ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk | 2 +- ReactAndroid/src/main/jni/third-party/boost/Android.mk | 2 +- ReactAndroid/src/main/jni/third-party/folly/Android.mk | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsc/jni/BUCK b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsc/jni/BUCK index 81f476d41..93a1a1c5a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsc/jni/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsc/jni/BUCK @@ -7,7 +7,7 @@ rn_xplat_cxx_library( compiler_flags = [ "-Wall", "-fexceptions", - "-std=gnu++1y", + "-std=c++1y", ], platforms = ANDROID, soname = "libfabricjscjni.$(ext)", diff --git a/ReactAndroid/src/main/jni/Application.mk b/ReactAndroid/src/main/jni/Application.mk index 4f1b600b5..4ad9bafd2 100644 --- a/ReactAndroid/src/main/jni/Application.mk +++ b/ReactAndroid/src/main/jni/Application.mk @@ -10,6 +10,7 @@ NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSE APP_STL := gnustl_shared # Make sure every shared lib includes a .note.gnu.build-id header +APP_CPPFLAGS := -std=c++1y APP_LDFLAGS := -Wl,--build-id -NDK_TOOLCHAIN_VERSION := 4.8 +NDK_TOOLCHAIN_VERSION := 4.9 diff --git a/ReactAndroid/src/main/jni/first-party/fb/Android.mk b/ReactAndroid/src/main/jni/first-party/fb/Android.mk index 4540eef1d..cf85de2f8 100644 --- a/ReactAndroid/src/main/jni/first-party/fb/Android.mk +++ b/ReactAndroid/src/main/jni/first-party/fb/Android.mk @@ -32,7 +32,7 @@ ifeq ($(TOOLCHAIN_PERMISSIVE),true) endif LOCAL_CFLAGS += -DHAVE_POSIX_CLOCKS -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++11 LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) diff --git a/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk b/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk index 6d08079a7..be13e47a6 100644 --- a/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk +++ b/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk @@ -10,7 +10,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_CFLAGS := -fexceptions -fno-omit-frame-pointer LOCAL_CFLAGS += -Wall -Werror -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++11 LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) diff --git a/ReactAndroid/src/main/jni/third-party/boost/Android.mk b/ReactAndroid/src/main/jni/third-party/boost/Android.mk index 35de5ae29..2485b648f 100644 --- a/ReactAndroid/src/main/jni/third-party/boost/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/boost/Android.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0 -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++11 LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) LOCAL_MODULE := boost diff --git a/ReactAndroid/src/main/jni/third-party/folly/Android.mk b/ReactAndroid/src/main/jni/third-party/folly/Android.mk index 5692613c8..a89e79eb6 100644 --- a/ReactAndroid/src/main/jni/third-party/folly/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/folly/Android.mk @@ -16,7 +16,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti LOCAL_CFLAGS += -Wall -Werror -std=c++11 -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++11 LOCAL_CFLAGS += $(CXX11_FLAGS) FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1