From 459eabbef29411d1e87d3e1ec4cac4e9e9bbd94d Mon Sep 17 00:00:00 2001 From: David Vacca Date: Thu, 6 Aug 2020 11:50:03 -0700 Subject: [PATCH] Extend 'better' module to compile in OSS Summary: This diff extends the 'better' module to compile in OSS changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D22918208 fbshipit-source-id: 11cf7c093bd1d50bbb53c6b6a740a3db41971fc0 --- .../src/main/jni/react/jni/Android.mk | 3 +- ReactCommon/better/Android.mk | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 ReactCommon/better/Android.mk diff --git a/ReactAndroid/src/main/jni/react/jni/Android.mk b/ReactAndroid/src/main/jni/react/jni/Android.mk index 13d342bc038..cc7e1a8b5f3 100644 --- a/ReactAndroid/src/main/jni/react/jni/Android.mk +++ b/ReactAndroid/src/main/jni/react/jni/Android.mk @@ -22,7 +22,7 @@ LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture LOCAL_LDLIBS += -landroid # The dynamic libraries (.so files) that this module depends on. -LOCAL_SHARED_LIBRARIES := libfolly_json libfb libfbjni libglog_init libyoga libreact_utils libreact_render_debug libreact_render_graphics libreact_render_core libreact_render_mapbuffer react_render_componentregistry libreact_render_components_view libreact_render_components_view libreact_render_components_unimplementedview libreact_render_components_root libreact_render_components_scrollview +LOCAL_SHARED_LIBRARIES := libfolly_json libfb libfbjni libglog_init libyoga libreact_utils libreact_render_debug libreact_render_graphics libreact_render_core libreact_render_mapbuffer react_render_componentregistry libreact_render_components_view libreact_render_components_view libreact_render_components_unimplementedview libreact_render_components_root libreact_render_components_scrollview libbetter # The static libraries (.a files) that this module depends on. LOCAL_STATIC_LIBRARIES := libreactnative libcallinvokerholder libruntimeexecutor @@ -59,6 +59,7 @@ include $(BUILD_SHARED_LIBRARY) # Whenever you encounter an include //Android.mk, you # tell andorid-ndk to compile the module in / according # to the specification inside //Android.mk. +$(call import-module,better) $(call import-module,folly) $(call import-module,fb) $(call import-module,fbjni) diff --git a/ReactCommon/better/Android.mk b/ReactCommon/better/Android.mk new file mode 100644 index 00000000000..d21a67d8648 --- /dev/null +++ b/ReactCommon/better/Android.mk @@ -0,0 +1,28 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := better + +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/ +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ + +LOCAL_CFLAGS := \ + -DLOG_TAG=\"Better\" + +LOCAL_CFLAGS += -fexceptions -frtti -std=c++14 -Wall + +LOCAL_STATIC_LIBRARIES := + +LOCAL_SHARED_LIBRARIES := glog + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,glog)