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