Files
react-native/ReactCommon/react/config/BUCK
T
Michael Lee (Engineering) 2d66bd4851 Rename the folly headers_only target to warn
Summary:
This target is not a good idea for a number of reasons:
1. It groups up multiple targets which breaks the dependency graph
2. It does not handle dependency remapping correctly
3. It has no mirror into fbcode

We should warn people this is a bad idea

Reviewed By: alexmalyshev

Differential Revision: D36519357

fbshipit-source-id: d60ca3237c7710118732578fecd1b2fc8903321b
2022-05-26 08:17:27 -07:00

46 lines
1.5 KiB
Python

load("@fbsource//tools/build_defs:glob_defs.bzl", "subdir_glob")
load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "APPLE", "CXX")
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "flags", "get_preprocessor_flags_for_build_mode", "get_static_library_ios_flags")
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "get_apple_inspector_flags", "rn_xplat_cxx_library")
APPLE_COMPILER_FLAGS = flags.get_flag_value(
get_static_library_ios_flags(),
"compiler_flags",
)
rn_xplat_cxx_library(
name = "config",
srcs = glob(["**/*.cpp"]),
header_namespace = "",
exported_headers = subdir_glob(
[
("", "**/*.h"),
],
prefix = "react/config",
),
compiler_flags_enable_exceptions = True,
compiler_flags_enable_rtti = True, # for ReactNativeConfig
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
force_static = True,
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholder",
"supermodule:xplat/default/public.react_native.infra",
],
platforms = (ANDROID, APPLE, CXX),
preprocessor_flags = [
"-DLOG_TAG=\"ReactNative\"",
"-DWITH_FBSYSTRACE=1",
],
visibility = [
"PUBLIC",
],
deps = [
"//third-party/glog:glog",
"//xplat/fbsystrace:fbsystrace",
"//xplat/folly:headers_only_do_not_use",
"//xplat/folly:memory",
"//xplat/folly:molly",
],
)