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
This commit is contained in:
Riccardo Cipolleschi
2025-10-07 10:54:32 -07:00
committed by meta-codesync[bot]
parent 44725b88be
commit 58afeeff1d
@@ -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