From 58afeeff1d391a4f644c2120b851965029fa63e7 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 7 Oct 2025 10:54:32 -0700 Subject: [PATCH] Split macro for static module registration (#53992) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53992 This change descouple the Static Module registration from the Disable Legacy arch macro ## Changelog: [Internal] - Reviewed By: RSNara Differential Revision: D83554091 fbshipit-source-id: 515aecc00428281a95441954513ccf21ff180f6f --- packages/react-native/React/Base/RCTBridgeModule.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/Base/RCTBridgeModule.h b/packages/react-native/React/Base/RCTBridgeModule.h index 83cb151be2e..1e60ff5b583 100644 --- a/packages/react-native/React/Base/RCTBridgeModule.h +++ b/packages/react-native/React/Base/RCTBridgeModule.h @@ -69,7 +69,7 @@ RCT_EXTERN_C_END * will be used as the JS module name. If omitted, the JS module name will * match the Objective-C class name. */ -#ifndef RCT_REMOVE_LEGACY_ARCH +#ifndef RCT_DISABLE_STATIC_MODULE_REGISTRATION #define RCT_EXPORT_MODULE(js_name) \ RCT_EXTERN void RCTRegisterModule(Class); \ +(NSString *)moduleName \ @@ -90,7 +90,7 @@ RCT_EXTERN_C_END return @ #js_name; \ } -#endif // RCT_REMOVE_LEGACY_ARCH +#endif // RCT_DISABLE_STATIC_MODULE_REGISTRATION /** * Same as RCT_EXPORT_MODULE, but uses __attribute__((constructor)) for module