Remove the restriction on importing bridge:cxxreact

Reviewed By: javache

Differential Revision: D5724406

fbshipit-source-id: 24974601d161fd23805d8e925b2b20a1cf11850d
This commit is contained in:
Marc Horowitz
2017-08-30 11:48:05 -07:00
committed by Facebook Github Bot
parent dd92dba3da
commit de01f09b5d
6 changed files with 179 additions and 128 deletions

View File

@@ -122,28 +122,11 @@ rn_xplat_cxx_library(
"-DWITH_JSC_MEMORY_PRESSURE=1",
"-DWITH_FB_MEMORY_PROFILING=1",
],
fbandroid_visibility = [
# TL;DR: If you depend on this target directly, you're gonna have a
# Bad Time(TM).
#
# `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does
# some platform-dependant setup. Exactly what setup to do is
# determined by some static functors, defined in `Platform.h`, which
# are initially `nullptr`. On Android, these functors are properly
# assigned as part of `react/jni`'s `JNI_OnLoad`. By depending directly
# on the bridge, we can mess up the SO initialisation order, causing
# `initOnJSVMThread` to be called before the platform-specific hooks
# have been properly initialised. Bad Times(TM).
# -- @ashokmenon (2017/01/03)
react_native_target("jni/react/jni:jni"),
react_native_xplat_target("cxxreact/..."),
],
fbobjc_frameworks = [
"$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
],
fbobjc_inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS,
fbobjc_preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS,
fbobjc_visibility = ["PUBLIC"],
force_static = True,
preprocessor_flags = [
"-DLOG_TAG=\"ReactNative\"",
@@ -152,6 +135,7 @@ rn_xplat_cxx_library(
tests = [
react_native_xplat_target("cxxreact/tests:tests"),
],
visibility = ["PUBLIC"],
deps = [
":module",
":jsbigstring",