mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-09 09:12:06 +08:00
Reviewed By: lexs Differential Revision: D2982150 fb-gh-sync-id: c75d05988df50b9788608e7c1bf00c4952ccfce1 shipit-source-id: c75d05988df50b9788608e7c1bf00c4952ccfce1
90 lines
1.9 KiB
Python
90 lines
1.9 KiB
Python
include_defs('//ReactAndroid/DEFS')
|
|
|
|
# We depend on JSC, support the same platforms
|
|
SUPPORTED_PLATFORMS = '^android-(armv7|x86)$'
|
|
|
|
DEPS = [
|
|
'//native/third-party/android-ndk:android',
|
|
'//xplat/fbsystrace:fbsystrace',
|
|
'//xplat/folly:molly',
|
|
'//xplat/third-party/glog:glog',
|
|
]
|
|
|
|
PREPROCESSOR_FLAGS = [
|
|
'-DLOG_TAG="ReactNative"',
|
|
'-DWITH_JSC_EXTRA_TRACING=1',
|
|
'-DWITH_FBSYSTRACE=1',
|
|
]
|
|
|
|
def react_library(**kwargs):
|
|
cxx_library(
|
|
name = 'react',
|
|
visibility = [
|
|
react_native_target('jni/react/jni:jni'),
|
|
],
|
|
deps = DEPS + JSC_DEPS,
|
|
preprocessor_flags = PREPROCESSOR_FLAGS,
|
|
**kwargs
|
|
)
|
|
|
|
cxx_library(
|
|
name = 'react-internal',
|
|
visibility = [
|
|
react_native_target('jni/react/jni:jni-internal'),
|
|
],
|
|
deps = DEPS + JSC_INTERNAL_DEPS,
|
|
preprocessor_flags = PREPROCESSOR_FLAGS + [
|
|
'-DWITH_FB_JSC_TUNING=1',
|
|
'-DWITH_JSC_MEMORY_PRESSURE=1',
|
|
'-DWITH_FBJSCEXTENSIONS=1',
|
|
'-DWITH_JSC_INTERNAL=1',
|
|
'-DWITH_FB_MEMORY_PROFILING=1',
|
|
],
|
|
**kwargs
|
|
)
|
|
|
|
react_library(
|
|
soname = 'libreactnative.so',
|
|
header_namespace = 'react',
|
|
supported_platforms_regex = SUPPORTED_PLATFORMS,
|
|
force_static = True,
|
|
srcs = [
|
|
'Bridge.cpp',
|
|
'Value.cpp',
|
|
'MethodCall.cpp',
|
|
'JSCHelpers.cpp',
|
|
'JSCExecutor.cpp',
|
|
'JSCTracing.cpp',
|
|
'JSCMemory.cpp',
|
|
'JSCLegacyProfiler.cpp',
|
|
'JSCWebWorker.cpp',
|
|
'Platform.cpp',
|
|
],
|
|
headers = [
|
|
'JSCTracing.h',
|
|
'JSCLegacyProfiler.h',
|
|
'JSCMemory.h',
|
|
],
|
|
exported_headers = [
|
|
'AlignStack.h',
|
|
'Bridge.h',
|
|
'Executor.h',
|
|
'JSCExecutor.h',
|
|
'JSCHelpers.h',
|
|
'JSCWebWorker.h',
|
|
'MessageQueueThread.h',
|
|
'MethodCall.h',
|
|
'JSModulesUnbundle.h',
|
|
'Value.h',
|
|
'Platform.h',
|
|
'noncopyable.h',
|
|
],
|
|
compiler_flags = [
|
|
'-Wall',
|
|
'-std=c++11',
|
|
'-fexceptions',
|
|
'-fvisibility=hidden',
|
|
'-frtti',
|
|
],
|
|
)
|