Skip to content

Commit f72b687

Browse files
willholenfacebook-github-bot
authored andcommitted
Disable slow and regular asserts in Android dev builds
Summary: We were building Android OSS dev builds with HERMES_SLOW_DEBUG and without NDEBUG. This causes them to be significantly slower than necessary. Reviewed By: avp Differential Revision: D17186406 fbshipit-source-id: ecc0b670f8dc43e270a60c139b5eed44ae9915dd
1 parent cef1bb4 commit f72b687

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ if (HERMES_IS_ANDROID)
130130
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument")
131131

132132
# JS developers aren't VM developers. Give them a faster build.
133-
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -g")
133+
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -g -DNDEBUG")
134134

135135
# The release build can focus on size.
136136
set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG")

android/hermes/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ android {
2929
arguments "-DLLVM_BUILD_BASE=${hermes_ws}/llvm"
3030
arguments "-DLLVM_SRC_DIR=${hermes_ws}/llvm"
3131
arguments "-DFBSOURCE_DIR=${fbsource}"
32+
arguments "-DHERMES_SLOW_DEBUG=False"
3233
targets "libhermes"
3334
}
3435
}

0 commit comments

Comments
 (0)