Commit 93284f5
Define RN_BUILDING for React Native's own CocoaPods targets (#57858)
Summary:
Pull Request resolved: #57858
`RN_BUILDING` marks React Native's own targets so the react/cxxstableapi guards stay inert for internal sources, which keep including fine-grained headers directly.
It is required whenever `RN_STRICT_API` reaches React Native's own compilation rather than only the consumer's:
- Project-wide enablement — a consumer applying the flag to every pod target (the CocoaPods post_install idiom) or through a global Buck config. Without RN_BUILDING, React Native's own translation units fail against their own guards.
- Private headers — `PrivateGuard.h` has no umbrella escape (#if defined(RN_STRICT_API) && !defined(RN_BUILDING)), so RN_BUILDING is the only way internal code can include them at all.
Mark every first-party pod as part of React Native's own build by defining
`RN_BUILDING` for it, through a new `mark_as_react_native_build` helper called last in
each spec block
This change is inert on its own: nothing behaves differently unless a consumer defines
`RN_STRICT_API`.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D115051089
fbshipit-source-id: f1178e2d0727827e5f40fc7b4a8f55b4d9b505cc1 parent d3daf11 commit 93284f5
79 files changed
Lines changed: 221 additions & 0 deletions
File tree
- packages/react-native
- Libraries
- ActionSheetIOS
- AppDelegate
- Blob
- FBLazyVector
- Image
- LinkingIOS
- NativeAnimation
- Network
- PushNotificationIOS
- Required
- Settings
- Text
- TypeSafety
- Vibration
- ReactApple
- Libraries/RCTFoundation/RCTDeprecation
- RCTAnimatedModuleProvider
- RCTSwiftUIWrapper
- RCTSwiftUI
- ReactCommon
- callinvoker
- cxxreact
- hermes
- executor
- jserrorhandler
- jsiexecutor
- jsinspector-modern
- cdp
- network
- tracing
- jsitooling
- jsi
- logger
- oscompat
- reactperflogger
- react
- bridging
- cxxstableapi
- debug
- featureflags
- nativemodule
- core/platform/ios
- defaults
- dom
- featureflags
- idlecallbacks
- intersectionobserver
- microtasks
- mutationobserver
- samples
- viewtransition
- webperformance
- networking
- performance
- cdpmetrics
- timeline
- renderer
- consistency
- css
- debug
- graphics
- imagemanager/platform/ios
- runtimescheduler
- runtime
- platform/ios
- timing
- utils
- runtimeexecutor
- yoga
- React
- CoreModules
- Runtime
- scripts
- cocoapods
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
0 commit comments