diff --git a/ReactAndroid/src/main/jni/packagerconnection/BUCK b/ReactAndroid/src/main/jni/packagerconnection/BUCK index b1095f42d..caede9992 100644 --- a/ReactAndroid/src/main/jni/packagerconnection/BUCK +++ b/ReactAndroid/src/main/jni/packagerconnection/BUCK @@ -1,6 +1,6 @@ -load("//ReactNative:DEFS.bzl", "cxx_library", "FBJNI_TARGET", "ANDROID_JSC_DEPS", "APPLE_JSC_DEPS", "IS_OSS_BUILD", "react_native_xplat_target") +load("//ReactNative:DEFS.bzl", "rn_xplat_cxx_library", "FBJNI_TARGET", "ANDROID_JSC_DEPS", "APPLE_JSC_DEPS", "ANDROID", "IS_OSS_BUILD", "react_native_xplat_target") -cxx_library( +rn_xplat_cxx_library( name = "jni", srcs = glob(["*.cpp"]), headers = glob( @@ -16,6 +16,7 @@ cxx_library( ], fbandroid_deps = ANDROID_JSC_DEPS, fbobjc_deps = APPLE_JSC_DEPS, + platforms = ANDROID, preprocessor_flags = [ "-DLOG_TAG=\"PackagerConnectionJNI\"", "-DWITH_FBSYSTRACE=1", diff --git a/ReactAndroid/src/main/jni/react/jni/BUCK b/ReactAndroid/src/main/jni/react/jni/BUCK index a33e775d4..7673ad3bd 100644 --- a/ReactAndroid/src/main/jni/react/jni/BUCK +++ b/ReactAndroid/src/main/jni/react/jni/BUCK @@ -1,4 +1,4 @@ -load("//ReactNative:DEFS.bzl", "cxx_library", "react_native_xplat_target", "FBJNI_TARGET", "ANDROID_JSC_DEPS", "APPLE_JSC_DEPS", "IS_OSS_BUILD") +load("//ReactNative:DEFS.bzl", "rn_xplat_cxx_library", "react_native_xplat_target", "FBJNI_TARGET", "ANDROID_JSC_DEPS", "APPLE_JSC_DEPS", "ANDROID", "IS_OSS_BUILD") EXPORTED_HEADERS = [ "AndroidJSCFactory.h", @@ -20,7 +20,7 @@ EXPORTED_HEADERS = [ "WritableNativeMap.h", ] -cxx_library( +rn_xplat_cxx_library( name = "jni", srcs = glob(["*.cpp"]), headers = glob( @@ -41,6 +41,7 @@ cxx_library( fbandroid_allow_jni_merging = True, fbandroid_deps = ANDROID_JSC_DEPS, fbobjc_deps = APPLE_JSC_DEPS, + platforms = ANDROID, preprocessor_flags = [ "-DLOG_TAG=\"ReactNativeJNI\"", "-DWITH_FBSYSTRACE=1", diff --git a/ReactAndroid/src/main/jni/react/perftests/BUCK b/ReactAndroid/src/main/jni/react/perftests/BUCK index 4a9c42a4e..6baeaf898 100644 --- a/ReactAndroid/src/main/jni/react/perftests/BUCK +++ b/ReactAndroid/src/main/jni/react/perftests/BUCK @@ -1,12 +1,13 @@ -load("//ReactNative:DEFS.bzl", "cxx_library", "react_native_xplat_target") +load("//ReactNative:DEFS.bzl", "rn_xplat_cxx_library", "react_native_xplat_target", "ANDROID") -cxx_library( +rn_xplat_cxx_library( name = "perftests", srcs = ["OnLoad.cpp"], compiler_flags = [ "-fexceptions", "-std=c++1y", ], + platforms = ANDROID, soname = "libnativereactperftests.$(ext)", visibility = [ "fbandroid//instrumentation_tests/com/facebook/react/...", diff --git a/ReactNative/DEFS.bzl b/ReactNative/DEFS.bzl index 9cca53e66..8842ed74f 100644 --- a/ReactNative/DEFS.bzl +++ b/ReactNative/DEFS.bzl @@ -21,6 +21,7 @@ ANDROID_JSC_INTERNAL_DEPS = [ '//native/third-party/jsc:jsc_legacy_profiler', ] ANDROID_JSC_DEPS = ANDROID_JSC_INTERNAL_DEPS +ANDROID = "Android" YOGA_TARGET = '//ReactAndroid/src/main/java/com/facebook:yoga' FBGLOGINIT_TARGET = '//ReactAndroid/src/main/jni/first-party/fbgloginit:fbgloginit' @@ -33,7 +34,7 @@ with allow_unsafe_import(): # Building is not supported in OSS right now -def rn_xplat_cxx_library(name, **kwargs): +def rn_xplat_cxx_library(name, platforms = None, **kwargs): cxx_library(name=name, **kwargs)