Skip to content

Commit ec9cc9c

Browse files
crysbotysbaddaden
andauthored
Fix: CRYSTAL_LOAD_DEBUG_INFO=1 fails with -Dexecution_context (#15704) (#15715)
Co-authored-by: Julien Portalier <[email protected]>
1 parent ac360a0 commit ec9cc9c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/kernel.cr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,12 @@ end
599599
{% end %}
600600

601601
{% unless flag?(:interpreted) || flag?(:wasm32) %}
602+
{% if flag?(:execution_context) %}
603+
Fiber::ExecutionContext.init_default_context
604+
{% else %}
605+
Crystal::Scheduler.init
606+
{% end %}
607+
602608
# load debug info on start up of the program is executed with CRYSTAL_LOAD_DEBUG_INFO=1
603609
# this will make debug info available on print_frame that is used by Crystal's segfault handler
604610
#
@@ -608,12 +614,6 @@ end
608614
Exception::CallStack.load_debug_info if ENV["CRYSTAL_LOAD_DEBUG_INFO"]? == "1"
609615
Exception::CallStack.setup_crash_handler
610616

611-
{% if flag?(:execution_context) %}
612-
Fiber::ExecutionContext.init_default_context
613-
{% else %}
614-
Crystal::Scheduler.init
615-
{% end %}
616-
617617
{% if flag?(:win32) %}
618618
Crystal::System::Process.start_interrupt_loop
619619
{% else %}

0 commit comments

Comments
 (0)