Skip to content

Commit

Permalink
Use new JavaScriptCore from npm (facebook#22231)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#22231

- Use clang instead of the deprecated gcc
- Use libc++ instead of the deprecated gnustl
- Updated gradle and android plugin version
- Fixed missing arch in local-cli template
- `clean` task should now always succeed
- `clean` task deletes build artifacts
- No need to specify buildToolsVersion. It's derived.
- Elvis operator for more readable code
Pull Request resolved: facebook#22263

Reviewed By: hramos

Differential Revision: D13004499

Pulled By: DanielZlotin

fbshipit-source-id: da54bb744cedb4c6f3bda590f8c25d0ad64086ef
  • Loading branch information
DanielZlotin authored and KusStar committed Oct 29, 2020
1 parent 69ab6fa commit ba47bdf
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ReactAndroid/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ 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_CPPFLAGS := -std=c++1y
APP_LDFLAGS := -Wl,--build-id

NDK_TOOLCHAIN_VERSION := 4.9
NDK_TOOLCHAIN_VERSION := clang
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/react/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
# ./../ == react
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..

LOCAL_CFLAGS += -fexceptions -frtti
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture

LOCAL_LDLIBS += -landroid

Expand Down
1 change: 1 addition & 0 deletions ReactAndroid/src/main/jni/third-party/folly/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/src/main/jni/third-party/glog/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ LOCAL_CFLAGS += \
-g \
-O2 \
-D_START_GOOGLE_NAMESPACE_="namespace google {" \
-D_END_GOOGLE_NAMESPACE_="}"
-D_END_GOOGLE_NAMESPACE_="}" \
-DHAVE_PREAD=1


LOCAL_MODULE := glog
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/cxxreact/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := \
-DLOG_TAG=\"ReactNative\"

LOCAL_CFLAGS += -fexceptions -frtti
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture

LOCAL_STATIC_LIBRARIES := boost
LOCAL_SHARED_LIBRARIES := jsinspector libfolly_json glog
Expand Down

0 comments on commit ba47bdf

Please sign in to comment.