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 = "debug", 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/debug", 31 ), 32 compiler_flags_pedantic = True, 33 exported_platform_linker_flags = [ 34 ( 35 "^android.*", 36 ["-llog"], 37 ), 38 ], 39 fbandroid_linker_flags = [ 40 # for android react_native_assert 41 "-llog", 42 ], 43 fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, 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/fbsystrace:fbsystrace", 59 "//xplat/folly:conv", 60 "//xplat/folly:format", 61 ], 62 exported_deps = [ 63 "//third-party/glog:glog", 64 ], 65) 66