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 "react_native_target", 10 "react_native_xplat_target", 11 "rn_xplat_cxx_library", 12 "subdir_glob", 13) 14 15APPLE_COMPILER_FLAGS = get_apple_compiler_flags() 16 17rn_xplat_cxx_library( 18 name = "utils", 19 srcs = glob( 20 [ 21 "**/*.cpp", 22 "**/*.mm", 23 ], 24 exclude = glob(["tests/**/*.cpp"]), 25 ), 26 headers = glob( 27 ["**/*.h"], 28 exclude = glob(["tests/**/*.h"]), 29 ), 30 header_namespace = "", 31 exported_headers = subdir_glob( 32 [ 33 ("", "*.h"), 34 ], 35 prefix = "react/utils", 36 ), 37 compiler_flags_pedantic = True, 38 fbandroid_deps = [ 39 react_native_target("jni/react/mapbuffer:jni"), 40 react_native_xplat_target("react/renderer/mapbuffer:mapbuffer"), 41 ], 42 fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, 43 fbobjc_frameworks = ["Foundation"], 44 fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(), 45 force_static = True, 46 labels = [ 47 "pfh:ReactNative_CommonInfrastructurePlaceholder", 48 ], 49 macosx_tests_override = [], 50 platforms = (ANDROID, APPLE, CXX), 51 preprocessor_flags = [ 52 "-DLOG_TAG=\"ReactNative\"", 53 "-DWITH_FBSYSTRACE=1", 54 ], 55 tests = [], 56 visibility = ["PUBLIC"], 57 deps = [ 58 "//xplat/folly:container_evicting_cache_map", 59 "//xplat/jsi:jsi", 60 react_native_xplat_target("butter:butter"), 61 react_native_xplat_target("react/debug:debug"), 62 ], 63) 64