mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c5bc3f1373
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36177 react_native_assert calls C `assert()`, where XCode does not have a built-in breakpoint navigator to hook to assertion failures (though you can add a symbolic breakpoint to "abort()" to get the effect). This changes the Apple implemented of `react_native_assert()` to use `NSCAssert` under the hood. This is safe to use in C functions, but will be trapped by the default XCode exceptions breakpoint navigator. Changelog: [iOS][Fixed] - Use NSCAssert() in react_native_assert instead of C assert() Reviewed By: cipolleschi Differential Revision: D43275024 fbshipit-source-id: 43c4e4f1ae6b99f32634d4b1880bce712c3ae8f6
64 lines
1.5 KiB
Python
64 lines
1.5 KiB
Python
load(
|
|
"//tools/build_defs/oss:rn_defs.bzl",
|
|
"ANDROID",
|
|
"APPLE",
|
|
"CXX",
|
|
"get_apple_compiler_flags",
|
|
"get_apple_inspector_flags",
|
|
"get_preprocessor_flags_for_build_mode",
|
|
"rn_xplat_cxx_library",
|
|
"subdir_glob",
|
|
)
|
|
|
|
APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "debug",
|
|
headers = glob(
|
|
["**/*.h"],
|
|
exclude = glob(["tests/**/*.h"]),
|
|
),
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[
|
|
("", "*.h"),
|
|
],
|
|
prefix = "react/debug",
|
|
),
|
|
compiler_flags_pedantic = True,
|
|
exported_platform_linker_flags = [
|
|
(
|
|
"^android.*",
|
|
["-llog"],
|
|
),
|
|
],
|
|
fbandroid_linker_flags = [
|
|
# for android react_native_assert
|
|
"-llog",
|
|
],
|
|
fbandroid_srcs = glob(["android/**/*.cpp"]),
|
|
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
|
|
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
|
|
fbobjc_srcs = glob(["ios/**/*.mm"]),
|
|
force_static = True,
|
|
labels = [
|
|
"pfh:ReactNative_CommonInfrastructurePlaceholder",
|
|
],
|
|
macosx_tests_override = [],
|
|
platforms = (ANDROID, APPLE, CXX),
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
tests = [],
|
|
visibility = ["PUBLIC"],
|
|
deps = [
|
|
"//xplat/fbsystrace:fbsystrace",
|
|
"//xplat/folly:conv",
|
|
"//xplat/folly:format",
|
|
],
|
|
exported_deps = [
|
|
"//third-party/glog:glog",
|
|
],
|
|
)
|