Skip to content

Commit 195b370

Browse files
committed
Add -Xline-directives flag to shermes compilation
Enable line directives in shermes output to improve source mapping in stack traces and error messages. This makes debugging JavaScript code compiled with shermes significantly easier. Applied to all build configurations (not just Debug) as the overhead is negligible and the benefit applies to all scenarios.
1 parent d3fd2b3 commit 195b370

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/hermes.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ function(hermes_compile_native)
7474
$<$<CONFIG:Debug>:-g3>
7575
--exported-unit=${ARG_UNIT_NAME}
7676
-Xes6-block-scoping
77+
-Xline-directives
7778
)
7879
if(ARG_FLAGS)
7980
list(APPEND COMPILER_FLAGS ${ARG_FLAGS})

0 commit comments

Comments
 (0)