mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e883197807
Summary: A reland of https://github.com/facebook/react-native/commit/f26ffbf5618d88b93fb84dd560303fe2e215cb2d Reviewed By: sammy-SC Differential Revision: D16091073 fbshipit-source-id: 09660ba987c3035333eac55e6bb94373fad9252b
100 lines
3.1 KiB
Python
100 lines
3.1 KiB
Python
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "OBJC_ARC_PREPROCESSOR_FLAGS", "get_debug_preprocessor_flags", "get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED")
|
|
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "rn_apple_library", "rn_debug_flags", "subdir_glob")
|
|
load(
|
|
"@fbsource//xplat/configurations/buck/apple/plugins/sad_xplat_hosted_configurations:react_module_registration.bzl",
|
|
"react_module_plugin_providers",
|
|
)
|
|
|
|
rn_apple_library(
|
|
name = "CoreModulesApple",
|
|
srcs = glob(
|
|
[
|
|
"**/*.m",
|
|
"**/*.mm",
|
|
],
|
|
),
|
|
headers = ["CoreModulesPlugins.h"],
|
|
compiler_flags = [
|
|
"-Wno-error=unguarded-availability-new",
|
|
"-Wno-unknown-warning-option",
|
|
],
|
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
|
exported_linker_flags = [
|
|
"-weak_framework",
|
|
"UserNotifications",
|
|
"-weak_framework",
|
|
"WebKit",
|
|
],
|
|
exported_preprocessor_flags = rn_debug_flags(),
|
|
frameworks = [
|
|
"Foundation",
|
|
"UIKit",
|
|
],
|
|
lang_compiler_flags = get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED(),
|
|
link_whole = True,
|
|
platform_preprocessor_flags = [(
|
|
"linux",
|
|
["-D PIC_MODIFIER=@PLT"],
|
|
)],
|
|
plugins = react_module_plugin_providers(
|
|
name = "PlatformConstants",
|
|
native_class_func = "RCTPlatformCls",
|
|
),
|
|
preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + get_debug_preprocessor_flags() + rn_debug_flags() + [
|
|
"-DRN_DISABLE_OSS_PLUGIN_HEADER",
|
|
],
|
|
visibility = ["PUBLIC"],
|
|
exported_deps = [
|
|
"fbsource//xplat/js/react-native-github:ReactInternalApple",
|
|
"fbsource//xplat/js/react-native-github/Libraries/FBReactNativeSpec:FBReactNativeSpecApple",
|
|
":CoreModulesAppleHeader",
|
|
],
|
|
)
|
|
|
|
# Workaround: define exported headers target separately so that the header
|
|
# namespace can be specified correctly.
|
|
rn_apple_library(
|
|
name = "CoreModulesAppleHeader",
|
|
srcs = [],
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[
|
|
(
|
|
"",
|
|
"*.h",
|
|
),
|
|
],
|
|
exclude = ["CoreModulesPlugins.h"],
|
|
prefix = "React",
|
|
),
|
|
compiler_flags = [
|
|
"-Wno-error=unguarded-availability-new",
|
|
"-Wno-unknown-warning-option",
|
|
],
|
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
|
exported_linker_flags = [
|
|
"-weak_framework",
|
|
"UserNotifications",
|
|
"-weak_framework",
|
|
"WebKit",
|
|
],
|
|
exported_preprocessor_flags = rn_debug_flags(),
|
|
frameworks = [
|
|
"Foundation",
|
|
"UIKit",
|
|
],
|
|
lang_compiler_flags = get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED(),
|
|
link_whole = True,
|
|
platform_preprocessor_flags = [(
|
|
"linux",
|
|
["-D PIC_MODIFIER=@PLT"],
|
|
)],
|
|
preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + get_debug_preprocessor_flags() + rn_debug_flags() + [
|
|
"-DRN_DISABLE_OSS_PLUGIN_HEADER",
|
|
],
|
|
visibility = ["PUBLIC"],
|
|
exported_deps = [
|
|
"fbsource//xplat/js/react-native-github:ReactInternalApple",
|
|
],
|
|
)
|