Skip to content

Commit e779fc8

Browse files
lavenzgfacebook-github-bot
authored andcommittedJan 31, 2025
Split build_mode in LIT config to debug_options and slow_debug
Summary: Originally `build_mode` controls `debug_options` and `slow_debug`. Determine these two flags directly in CMake and remove `build_mode`. Reviewed By: neildhar Differential Revision: D60076693 fbshipit-source-id: cd5f730be6f827ad352e9ef471205740557d02cf
1 parent 28272e1 commit e779fc8

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed
 

‎CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,8 @@ if(HERMES_ENABLE_TEST_SUITE)
800800
hbcdump=${HERMES_TOOLS_OUTPUT_DIR}/hbcdump
801801
hbc-deltaprep=${HERMES_TOOLS_OUTPUT_DIR}/hbc-deltaprep
802802
hbc_diff=${HERMES_TOOLS_OUTPUT_DIR}/hbc-diff
803-
build_mode="$<IF:$<CONFIG:Debug>,dbg,opt>"
803+
slow_debug=$<IF:$<CONFIG:Debug>,${HERMES_SLOW_DEBUG},OFF>
804+
debug_options=$<IF:$<CONFIG:Debug>,ON,OFF>
804805
exception_on_oom_enabled=${HERMESVM_EXCEPTION_ON_OOM}
805806
node_hermes_enabled_flag=${HERMES_BUILD_NODE_HERMES}
806807
node-hermes=${HERMES_TOOLS_OUTPUT_DIR}/node-hermes

‎cmake/modules/Lit.cmake

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ function(add_lit_target target comment)
1616
cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN})
1717
set(LIT_ARGS "${ARG_ARGS} ${LLVH_LIT_ARGS}")
1818
separate_arguments(LIT_ARGS)
19-
if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
20-
list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
21-
endif ()
2219

2320
set(LIT_COMMAND "${Python_EXECUTABLE};${HERMES_LIT_PATH}")
2421
list(APPEND LIT_COMMAND ${LIT_ARGS})

‎test/lit.cfg

+4-3
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ if isTrue(lit_config.params.get("exception_on_oom_enabled")):
7878
if lit_config.params.get("profiler") == "BB":
7979
config.available_features.add("basic_block_profiler")
8080

81-
if lit_config.params.get("build_mode") != "opt":
81+
if isTrue(lit_config.params.get("slow_debug")):
82+
config.available_features.add("slow_debug")
83+
84+
if isTrue(lit_config.params.get("debug_options")):
8285
config.available_features.add("debug_options")
83-
if lit_config.params.get("build_mode") == "dbg":
84-
config.available_features.add("slow_debug")
8586

8687
if lit_config.params.get("gc") == "MALLOC":
8788
config.available_features.add("gc_malloc")

0 commit comments

Comments
 (0)
Please sign in to comment.