Bump Android NDK to r17b (#20357)

Summary:
This PR bumps Android NDK version to r17b (latest). Cleaned up redundant **LOCAL_EXPORT_CPPFLAGS** rules in .mk files
Pull Request resolved: https://github.com/facebook/react-native/pull/20357

Differential Revision: D9068424

Pulled By: hramos

fbshipit-source-id: 8578637e38e807288b819a36cb75ea9feefcc09f
This commit is contained in:
Dulmandakh 2018-07-30 13:54:03 -07:00 committed by Facebook Github Bot
parent 1b09bd7fba
commit 6117a6c720
21 changed files with 27 additions and 69 deletions

View File

@ -49,21 +49,21 @@ aliases:
- &restore-cache-ndk - &restore-cache-ndk
keys: keys:
- v3-android-ndk-r10e-{{ checksum "scripts/android-setup.sh" }} - v3-android-ndk-r17b-{{ checksum "scripts/android-setup.sh" }}
- &save-cache-ndk - &save-cache-ndk
paths: paths:
- /opt/ndk - /opt/ndk
key: v3-android-ndk-r10e-{{ checksum "scripts/android-setup.sh" }} key: v3-android-ndk-r17b-{{ checksum "scripts/android-setup.sh" }}
- &restore-cache-downloads-buck - &restore-cache-downloads-buck
keys: keys:
- v3-buck-v2018.06.25.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}} - v3-buck-v2018.07.23.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
- v3-buck-v2018.06.25.01- - v3-buck-v2018.07.23.01-
- &save-cache-downloads-buck - &save-cache-downloads-buck
paths: paths:
- ~/buck - ~/buck
- ~/okbuck - ~/okbuck
key: v3-buck-v2018.06.25.01-{{ checksum "scripts/circleci/buck_fetch.sh" }} key: v3-buck-v2018.07.23.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
- &restore-cache-watchman - &restore-cache-watchman
keys: keys:
@ -136,7 +136,7 @@ aliases:
name: Install BUCK name: Install BUCK
command: | command: |
if [[ ! -e ~/buck ]]; then if [[ ! -e ~/buck ]]; then
git clone https://github.com/facebook/buck.git ~/buck --branch v2018.06.25.01 --depth=1 git clone https://github.com/facebook/buck.git ~/buck --branch v2018.07.23.01 --depth=1
fi fi
cd ~/buck && ant cd ~/buck && ant
buck --version buck --version
@ -365,7 +365,7 @@ android_defaults: &android_defaults
- ADB_INSTALL_TIMEOUT: 10 - ADB_INSTALL_TIMEOUT: 10
- _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" - _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"' - GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"'
- ANDROID_NDK: '/opt/ndk/android-ndk-r10e' - ANDROID_NDK: '/opt/ndk/android-ndk-r17b'
- BUILD_THREADS: 2 - BUILD_THREADS: 2
macos_defaults: &macos_defaults macos_defaults: &macos_defaults

View File

@ -20,8 +20,8 @@ LABEL maintainer="Héctor Ramos <hector@fb.com>"
ARG SDK_VERSION=sdk-tools-linux-3859397.zip ARG SDK_VERSION=sdk-tools-linux-3859397.zip
ARG ANDROID_BUILD_VERSION=26 ARG ANDROID_BUILD_VERSION=26
ARG ANDROID_TOOLS_VERSION=26.0.3 ARG ANDROID_TOOLS_VERSION=26.0.3
ARG BUCK_VERSION=v2018.06.25.01 ARG BUCK_VERSION=v2018.07.23.01
ARG NDK_VERSION=10e ARG NDK_VERSION=17b
ARG NODE_VERSION=8.10.0 ARG NODE_VERSION=8.10.0
ARG WATCHMAN_VERSION=4.9.0 ARG WATCHMAN_VERSION=4.9.0

View File

@ -1,4 +1,3 @@
android.useDeprecatedNdk=true
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.configureondemand=true org.gradle.configureondemand=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore MYAPP_RELEASE_STORE_FILE=my-release-key.keystore

View File

@ -5,8 +5,6 @@ POM_NAME=ReactNative
POM_ARTIFACT_ID=react-native POM_ARTIFACT_ID=react-native
POM_PACKAGING=aar POM_PACKAGING=aar
android.useDeprecatedNdk=true
MOCKITO_CORE_VERSION=1.10.19 MOCKITO_CORE_VERSION=1.10.19
POWERMOCK_VERSION=1.6.2 POWERMOCK_VERSION=1.6.2
ROBOLECTRIC_VERSION=3.0 ROBOLECTRIC_VERSION=3.0

View File

@ -10,6 +10,7 @@ NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSE
APP_STL := gnustl_shared APP_STL := gnustl_shared
# Make sure every shared lib includes a .note.gnu.build-id header # Make sure every shared lib includes a .note.gnu.build-id header
APP_CFLAGS := -Wall -Werror
APP_CPPFLAGS := -std=c++1y APP_CPPFLAGS := -std=c++1y
APP_LDFLAGS := -Wl,--build-id APP_LDFLAGS := -Wl,--build-id

View File

@ -24,7 +24,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CFLAGS := -DLOG_TAG=\"libfb\" -DDISABLE_CPUCAP -DDISABLE_XPLAT -fexceptions -frtti LOCAL_CFLAGS := -DLOG_TAG=\"libfb\" -DDISABLE_CPUCAP -DDISABLE_XPLAT -fexceptions -frtti
LOCAL_CFLAGS += -Wall -Werror
# include/utils/threads.h has unused parameters # include/utils/threads.h has unused parameters
LOCAL_CFLAGS += -Wno-unused-parameter LOCAL_CFLAGS += -Wno-unused-parameter
ifeq ($(TOOLCHAIN_PERMISSIVE),true) ifeq ($(TOOLCHAIN_PERMISSIVE),true)
@ -32,11 +31,6 @@ ifeq ($(TOOLCHAIN_PERMISSIVE),true)
endif endif
LOCAL_CFLAGS += -DHAVE_POSIX_CLOCKS LOCAL_CFLAGS += -DHAVE_POSIX_CLOCKS
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_LDLIBS := -llog -ldl -landroid LOCAL_LDLIBS := -llog -ldl -landroid
LOCAL_EXPORT_LDLIBS := -llog LOCAL_EXPORT_LDLIBS := -llog

View File

@ -8,12 +8,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS := -fexceptions -fno-omit-frame-pointer LOCAL_CFLAGS := -fexceptions -fno-omit-frame-pointer
LOCAL_CFLAGS += -Wall -Werror
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_LDLIBS := -llog LOCAL_LDLIBS := -llog

View File

@ -9,10 +9,7 @@ LOCAL_SRC_FILES := \
LOCAL_C_INCLUDES := $(LOCAL_PATH)/jni LOCAL_C_INCLUDES := $(LOCAL_PATH)/jni
LOCAL_CFLAGS += -Wall -Werror -fvisibility=hidden -fexceptions -frtti -O3 LOCAL_CFLAGS += -fvisibility=hidden -fexceptions -frtti -O3
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_LDLIBS += -landroid -llog LOCAL_LDLIBS += -landroid -llog
LOCAL_STATIC_LIBRARIES := libyogacore LOCAL_STATIC_LIBRARIES := libyogacore

View File

@ -31,10 +31,7 @@ LOCAL_SRC_FILES := \
LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../.. LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
LOCAL_CFLAGS += -Wall -Werror -fvisibility=hidden -fexceptions -frtti LOCAL_CFLAGS += -fvisibility=hidden -fexceptions -frtti
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_LDLIBS += -landroid LOCAL_LDLIBS += -landroid
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libjsc libglog_init libyoga libprivatedata LOCAL_SHARED_LIBRARIES := libfolly_json libfb libjsc libglog_init libyoga libprivatedata

View File

@ -3,8 +3,6 @@ include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0 LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
CXX11_FLAGS := -std=c++11
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_MODULE := boost LOCAL_MODULE := boost

View File

@ -16,8 +16,7 @@ LOCAL_SRC_FILES := \
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
CXX11_FLAGS := -std=c++11 -Wno-unused-variable -Wno-unused-local-typedefs CXX11_FLAGS := -Wno-unused-variable -Wno-unused-local-typedefs
LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -14,15 +14,11 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti
LOCAL_CFLAGS += -Wall -Werror -std=c++11
CXX11_FLAGS := -std=c++11 FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1
LOCAL_CFLAGS += $(CXX11_FLAGS)
FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1
LOCAL_CFLAGS += $(FOLLY_FLAGS) LOCAL_CFLAGS += $(FOLLY_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) $(FOLLY_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(FOLLY_FLAGS)
LOCAL_MODULE := libfolly_json LOCAL_MODULE := libfolly_json

View File

@ -16,7 +16,6 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/
LOCAL_CFLAGS += \ LOCAL_CFLAGS += \
-Wall \
-Wwrite-strings \ -Wwrite-strings \
-Woverloaded-virtual \ -Woverloaded-virtual \
-Wno-sign-compare \ -Wno-sign-compare \

View File

@ -33,10 +33,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := \ LOCAL_CFLAGS := \
-DLOG_TAG=\"ReactNative\" -DLOG_TAG=\"ReactNative\"
LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti LOCAL_CFLAGS += -fexceptions -frtti
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_STATIC_LIBRARIES := jschelpers LOCAL_STATIC_LIBRARIES := jschelpers
LOCAL_SHARED_LIBRARIES := libfb libfolly_json libjsc libglog LOCAL_SHARED_LIBRARIES := libfb libfolly_json libjsc libglog

View File

@ -15,10 +15,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := \ LOCAL_CFLAGS := \
-DLOG_TAG=\"ReactNative\" -DLOG_TAG=\"ReactNative\"
LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti LOCAL_CFLAGS += -fexceptions -frtti
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
LOCAL_SHARED_LIBRARIES := libfolly_json libjsc libglog LOCAL_SHARED_LIBRARIES := libfolly_json libjsc libglog

View File

@ -10,9 +10,6 @@ LOCAL_SRC_FILES := \
LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS += -Wall -Werror -fexceptions LOCAL_CFLAGS += -fexceptions
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)

View File

@ -13,9 +13,6 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := \ LOCAL_CFLAGS := \
-DLOG_TAG=\"ReactNative\" -DLOG_TAG=\"ReactNative\"
LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti LOCAL_CFLAGS += -fexceptions -frtti
CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)

View File

@ -9,6 +9,6 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/yoga/*.cpp)
LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := -Wall -Werror -fexceptions -frtti -std=c++1y -O3 LOCAL_CFLAGS := -fexceptions -frtti -O3
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -1,13 +1,13 @@
environment: environment:
ANDROID_HOME: "C:\\android-sdk-windows" ANDROID_HOME: "C:\\android-sdk-windows"
ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r10e" ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r17b"
ANDROID_BUILD_VERSION: 26 ANDROID_BUILD_VERSION: 26
ANDROID_TOOLS_VERSION: 26.0.3 ANDROID_TOOLS_VERSION: 26.0.3
GRADLE_OPTS: -Dorg.gradle.daemon=false GRADLE_OPTS: -Dorg.gradle.daemon=false
SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip
NDK_TOOLS_URL: https://dl.google.com/android/repository/android-ndk-r10e-windows-x86_64.zip NDK_TOOLS_URL: https://dl.google.com/android/repository/android-ndk-r17b-windows-x86_64.zip
matrix: matrix:
- nodejs_version: 8 - nodejs_version: 8

View File

@ -16,5 +16,3 @@
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # org.gradle.parallel=true
android.useDeprecatedNdk=true

View File

@ -34,7 +34,7 @@ function getAndroidNDK {
if [ ! -e $DEPS ]; then if [ ! -e $DEPS ]; then
cd $NDK_HOME || exit cd $NDK_HOME || exit
echo "Downloading NDK..." echo "Downloading NDK..."
curl -o ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip curl -o ndk.zip https://dl.google.com/android/repository/android-ndk-r17b-linux-x86_64.zip
unzip -o -q ndk.zip unzip -o -q ndk.zip
echo "Installed Android NDK at $NDK_HOME" echo "Installed Android NDK at $NDK_HOME"
touch $DEPS touch $DEPS