diff --git a/lib/system.nim b/lib/system.nim index 64a70b61bc..f3e7c525a4 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -1935,6 +1935,7 @@ when not defined(EcmaScript) and not defined(NimrodVM): include "system/syslocks" include "system/threads" elif not defined(nogc): + when not defined(useNimRtl) and not defined(createNimRtl): initStackBottom() initGC() proc setControlCHook*(hook: proc () {.noconv.}) diff --git a/lib/system/threads.nim b/lib/system/threads.nim index 6b1fd21783..87411c9355 100755 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -203,6 +203,7 @@ when not defined(useNimRtl): when not useStackMaskHack: var mainThread: TGcThread ThreadVarSetValue(globalsSlot, addr(mainThread)) + when not defined(createNimRtl): initStackBottom() initGC() when emulatedThreadVars: