Configure unstable-react-profiling build mode (#47028)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47028

This is a mostly internal diff enabling us to selectively enable Fusebox in release builds (experimental).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D64110061

fbshipit-source-id: a5f5d59d7a512bb47603cf83fd60f2c2202c22ab
This commit is contained in:
Alex Hunt
2024-11-12 06:55:53 -08:00
committed by Facebook GitHub Bot
parent a78a5af657
commit 1e5286866a
5 changed files with 9 additions and 1 deletions
@@ -1926,6 +1926,7 @@ public final class com/facebook/react/common/build/ReactBuildConfig {
public static final field EXOPACKAGE_FLAGS I
public static final field INSTANCE Lcom/facebook/react/common/build/ReactBuildConfig;
public static final field IS_INTERNAL_BUILD Z
public static final field UNSTABLE_ENABLE_FUSEBOX_RELEASE Z
}
public abstract interface class com/facebook/react/common/mapbuffer/MapBuffer : java/lang/Iterable, kotlin/jvm/internal/markers/KMappedMarker {
@@ -519,6 +519,7 @@ android {
buildConfigField("boolean", "IS_INTERNAL_BUILD", "false")
buildConfigField("int", "EXOPACKAGE_FLAGS", "0")
buildConfigField("boolean", "UNSTABLE_ENABLE_FUSEBOX_RELEASE", "false")
resValue("integer", "react_native_dev_server_port", reactNativeDevServerPort())
@@ -23,4 +23,8 @@ public object ReactBuildConfig {
@JvmField public val IS_INTERNAL_BUILD: Boolean = BuildConfig.IS_INTERNAL_BUILD
@JvmField public val EXOPACKAGE_FLAGS: Int = BuildConfig.EXOPACKAGE_FLAGS
/** [Experimental] Enable React Native DevTools in release builds. */
@JvmField
public val UNSTABLE_ENABLE_FUSEBOX_RELEASE: Boolean = BuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE
}
@@ -194,7 +194,7 @@ public class ReactHostImpl implements ReactHost {
mUIExecutor = uiExecutor;
mMemoryPressureRouter = new MemoryPressureRouter(context);
mAllowPackagerServerAccess = allowPackagerServerAccess;
mUseDevSupport = useDevSupport;
mUseDevSupport = useDevSupport || ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE;
if (devSupportManagerFactory == null) {
devSupportManagerFactory = new DefaultDevSupportManagerFactory();
}
@@ -44,6 +44,8 @@ const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged()
true,
#elif defined(HERMES_ENABLE_DEBUGGER)
ReactNativeFeatureFlags::fuseboxEnabledDebug(),
#elif defined(REACT_NATIVE_ENABLE_FUSEBOX_RELEASE)
true,
#else
ReactNativeFeatureFlags::fuseboxEnabledRelease(),
#endif