Skip to content

Commit c9182e7

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Cover jsitooling with guards (#58262)
Summary: Classifies `jsitooling:jsitooling` as a for-frameworks target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/FrameworksGuard.h>` to the module's three exported headers (`JSRuntimeBindings.h`, `JSRuntimeFactory.h`, `JSRuntimeFactoryCAPI.h`), and wires the guard dependency into BUCK, CMake and CocoaPods. Changelog: [Internal] Differential Revision: D118118424
1 parent 2fa37b1 commit c9182e7

5 files changed

Lines changed: 16 additions & 1 deletion

File tree

packages/react-native/ReactCommon/jsitooling/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ target_link_libraries(jsitooling
2020
react_cxxreact
2121
folly_runtime
2222
glog
23-
jsi)
23+
jsi
24+
react_cxxstableapi)
2425

2526
target_compile_reactnative_options(jsitooling PRIVATE)
2627
target_compile_options(jsitooling PRIVATE -Wpedantic)

packages/react-native/ReactCommon/jsitooling/React-jsitooling.podspec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ else
1616
source[:tag] = "v#{version}"
1717
end
1818

19+
header_search_paths = []
20+
21+
if ENV['USE_FRAMEWORKS']
22+
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/..\"" # ReactCommon, for <react/cxxstableapi/...>
23+
end
24+
1925
Pod::Spec.new do |s|
2026
s.name = "React-jsitooling"
2127
s.version = version
@@ -31,12 +37,14 @@ Pod::Spec.new do |s|
3137
resolve_use_frameworks(s, header_mappings_dir: "./", module_name: "JSITooling")
3238

3339
s.pod_target_xcconfig = {
40+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
3441
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
3542
"DEFINES_MODULE" => "YES",
3643
}
3744

3845
s.dependency "React-cxxreact", version
3946
s.dependency "React-jsi", version
47+
s.dependency "React-cxxstableapi"
4048
add_dependency(s, "React-debug")
4149
add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"])
4250
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')

packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#pragma once
99

10+
#include <react/cxxstableapi/FrameworksGuard.h>
11+
1012
#include <jsi/jsi.h>
1113
#include <string>
1214

packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#pragma once
99

10+
#include <react/cxxstableapi/FrameworksGuard.h>
11+
1012
#ifdef __cplusplus
1113

1214
#include <jsi/jsi.h>

packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#pragma once
99

10+
#include <react/cxxstableapi/FrameworksGuard.h>
11+
1012
#ifdef __cplusplus
1113
extern "C" {
1214
#endif

0 commit comments

Comments
 (0)