From dc0192e8477bd0482b91639e2f4b137532ae7616 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 6 Jul 2023 01:50:30 -0700 Subject: [PATCH] Compile hermes-engine with -DHERMES_ENABLE_DEBUGGER=False on Release (#38212) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38212 This mirrors the same logic that the Hermes team has on facebook/hermes. Practically, we want to pass the CMake config flag `HERMES_ENABLE_DEBUGGER=False` only for Release so that their CMake build is configured correctly. Their build always enables the Debugger and allows us to selectively turn it off only for release builds. More context: https://github.com/facebook/hermes/commit/eabf5fcd25 Changelog: [Internal] [Changed] - Compile hermes-engine with -DHERMES_ENABLE_DEBUGGER=False on Release Reviewed By: cipolleschi Differential Revision: D47252735 fbshipit-source-id: 8096c8389a045ac0c56ace20ea3be2c1fa03603f --- packages/react-native/ReactAndroid/hermes-engine/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/ReactAndroid/hermes-engine/build.gradle b/packages/react-native/ReactAndroid/hermes-engine/build.gradle index f2a4f8d675df17..8aaf6cdb0cc016 100644 --- a/packages/react-native/ReactAndroid/hermes-engine/build.gradle +++ b/packages/react-native/ReactAndroid/hermes-engine/build.gradle @@ -191,6 +191,8 @@ android { externalNativeBuild { cmake { arguments "-DCMAKE_BUILD_TYPE=MinSizeRel" + // For release builds, we don't want to enable the Hermes Debugger. + arguments "-DHERMES_ENABLE_DEBUGGER=False" } } }