1load( 2 "//tools/build_defs/oss:rn_defs.bzl", 3 "ANDROID", 4 "APPLE", 5 "CXX", 6 "get_apple_compiler_flags", 7 "get_apple_inspector_flags", 8 "get_preprocessor_flags_for_build_mode", 9 "rn_xplat_cxx_library", 10 "subdir_glob", 11) 12 13APPLE_COMPILER_FLAGS = get_apple_compiler_flags() 14 15rn_xplat_cxx_library( 16 name = "native", 17 srcs = glob( 18 ["**/*.cpp"], 19 exclude = glob(["tests/**/*.cpp"]), 20 ), 21 headers = glob( 22 ["**/*.h"], 23 exclude = glob(["tests/**/*.h"]), 24 ), 25 header_namespace = "", 26 exported_headers = subdir_glob( 27 [ 28 ("", "*.h"), 29 ], 30 prefix = "react/renderer/componentregistry/native", 31 ), 32 compiler_flags_pedantic = True, 33 fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, 34 fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(), 35 force_static = True, 36 labels = [ 37 "pfh:ReactNative_CommonInfrastructurePlaceholder", 38 ], 39 macosx_tests_override = [], 40 platforms = (ANDROID, APPLE, CXX), 41 preprocessor_flags = [ 42 "-DLOG_TAG=\"ReactNative\"", 43 "-DWITH_FBSYSTRACE=1", 44 ], 45 visibility = ["PUBLIC"], 46 deps = [ 47 "//xplat/jsi:jsi", 48 ], 49) 50