diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index a419728d773e9c..124c5af023358c 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -86,17 +86,6 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy include "folly-${FOLLY_VERSION}/folly/**/*", 'Android.mk' eachFile {fname -> fname.path = (fname.path - "folly-${FOLLY_VERSION}/")} includeEmptyDirs = false - - // Patch for folly build break on gcc 4.9 and could be removed after build by clang - filesMatching('**/container/detail/F14Policy.h') { - filter(ReplaceTokens, tokens: [ - 'ObjectHolder(Args&&... args) : value_{std::forward(args)...} {}': 'ObjectHolder(Args&&... args) : value_({std::forward(args)...}) {}', - 'ObjectHolder(Args&&... args) : T{std::forward(args)...} {}': 'ObjectHolder(Args&&... args) : T({std::forward(args)...}) {}', - ], - beginToken: '', - endToken: '') - } - into "$thirdPartyNdkDir/folly" } diff --git a/ReactAndroid/src/main/jni/Application.mk b/ReactAndroid/src/main/jni/Application.mk index 942a122de79183..a58eeff840e0d5 100644 --- a/ReactAndroid/src/main/jni/Application.mk +++ b/ReactAndroid/src/main/jni/Application.mk @@ -24,11 +24,9 @@ APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST))) # etc.) are defined inside build.gradle. NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party$(HOST_DIRSEP)$(REACT_SRC_DIR) -APP_STL := gnustl_shared +APP_STL := c++_shared # Make sure every shared lib includes a .note.gnu.build-id header -APP_CFLAGS := -Wall -Werror +APP_CFLAGS := -Wall -Werror -Wno-unused-lambda-capture APP_CPPFLAGS := -std=c++1y APP_LDFLAGS := -Wl,--build-id - -NDK_TOOLCHAIN_VERSION := 4.9 diff --git a/ReactAndroid/src/main/jni/third-party/folly/Android.mk b/ReactAndroid/src/main/jni/third-party/folly/Android.mk index 4700879022a26d..96c28ce8906532 100644 --- a/ReactAndroid/src/main/jni/third-party/folly/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/folly/Android.mk @@ -26,6 +26,7 @@ FOLLY_FLAGS := \ -DFOLLY_NO_CONFIG=1 \ -DFOLLY_HAVE_CLOCK_GETTIME=1 \ -DFOLLY_HAVE_MEMRCHR=1 \ + -DFOLLY_USE_LIBCPP=1 \ # If APP_PLATFORM in Application.mk targets android-23 above, please comment this line. # NDK uses GNU style stderror_r() after API 23.