Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable hermes debugger on all build variants #33

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ android {
cmake {
arguments "-DCMAKE_BUILD_TYPE=MinSizeRel"
// For release builds, we don't want to enable the Hermes Debugger.
arguments "-DHERMES_ENABLE_DEBUGGER=False"
// For Expo Go, we have to enable debugging even on release builds.
arguments "-DHERMES_ENABLE_DEBUGGER=True"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_library(hermes_executor
target_compile_options(
hermes_executor
PRIVATE
$<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>
-DHERMES_ENABLE_DEBUGGER=1
-std=c++20
-fexceptions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_library(hermesinstancejni
target_compile_options(
hermesinstancejni
PRIVATE
$<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>
-DHERMES_ENABLE_DEBUGGER=1
-std=c++20
-fexceptions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_library(rninstance
target_compile_options(
rninstance
PRIVATE
$<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>
-DHERMES_ENABLE_DEBUGGER=1
-std=c++20
-fexceptions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ else()
hermes_executor_common
PRIVATE
-DNDEBUG
-DHERMES_ENABLE_DEBUGGER=1
)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ if(${CMAKE_BUILD_TYPE} MATCHES Debug)
PRIVATE
-DHERMES_ENABLE_DEBUGGER=1
)
else()
# Expo Go requires debugging on release builds
target_compile_options(
hermes_inspector_modern
PRIVATE
# Expo Go requires debugging on release builds
-DHERMES_ENABLE_DEBUGGER=1
)
endif()

target_include_directories(hermes_inspector_modern PUBLIC ${REACT_COMMON_DIR})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_library(bridgeless
target_compile_options(
bridgeless
PRIVATE
$<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>
-DHERMES_ENABLE_DEBUGGER=1
-std=c++20
-fexceptions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ react_native_path = File.join(__dir__, "..", "..")
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
version = package['version']

# Force building Hermes from source because Expo Go requires customized Hermes build
ENV['BUILD_FROM_SOURCE'] = 'true'

source_type = hermes_source_type(version, react_native_path)
source = podspec_source(source_type, version, react_native_path)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ function configure_apple_framework {
if [[ $BUILD_TYPE == "Debug" ]]; then
enable_debugger="true"
else
enable_debugger="false"
# Expo Go requires debugging on release build
enable_debugger="true"
fi
if [[ $BUILD_TYPE == "Debug" ]]; then
# JS developers aren't VM developers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ release_version="$1"; shift
hermesc_path="$1"; shift
jsi_path="$1"; shift

enable_debugger="false"
# Expo Go requires debugging on release build
enable_debugger="true"
if [[ "$CONFIGURATION" == "Debug" ]]; then
enable_debugger="true"
fi
Expand Down