File tree Expand file tree Collapse file tree
packages/react-native/ReactCommon/react/cxxstableapi
private/react-native-fantom/tester Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525 s . author = "Meta Platforms, Inc. and its affiliates"
2626 s . platforms = min_supported_versions
2727 s . source = source
28- s . source_files = podspec_sources ( "*.h " , "*.h" )
28+ s . source_files = podspec_sources ( "*.{cpp,h} " , "*.h" )
2929 s . header_dir = "react/cxxstableapi"
3030 s . pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard ( ) ,
3131 "DEFINES_MODULE" => "YES" }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ */
7+
8+ // The cxxstableapi guards are pure preprocessor headers, so this module has
9+ // nothing to compile. CocoaPods, however, emits a PBXAggregateTarget for a pod
10+ // with no compilable sources, and an aggregate target produces no .framework
11+ // under `use_frameworks!`. Dependents' header search paths point at
12+ // `React_cxxstableapi.framework/Headers`, so without a framework every
13+ // `#include <react/cxxstableapi/*.h>` fails to resolve.
14+ //
15+ // This translation unit exists solely to keep the pod a real framework target.
16+ // It is deliberately empty apart from the anchor below, which keeps the
17+ // resulting object file non-empty for linkers that object to one.
18+
19+ namespace facebook ::react {
20+
21+ namespace {
22+ [[maybe_unused]] const char * stableApiAnchor () {
23+ return " react/cxxstableapi" ;
24+ }
25+ } // namespace
26+
27+ } // namespace facebook::react
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ add_react_common_subdir(jsitooling)
5858add_react_common_subdir (logger )
5959add_react_common_subdir (oscompat )
6060add_react_common_subdir (react/bridging )
61+ add_react_common_subdir (react/cxxstableapi )
6162add_react_common_subdir (react/debug )
6263add_react_common_subdir (react/featureflags )
6364add_react_common_subdir (react/nativemodule/core )
You can’t perform that action at this time.
0 commit comments