fix #16458; make useNimRtl compile for --gc:orc (#19512)

* fix #16458; make useNimRtl compile for --gc:orc/arc

* fix tests
This commit is contained in:
flywind 2022-02-11 18:16:27 +08:00 • committed by GitHub
commit b936bfd01a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View file

@ -82,8 +82,9 @@ else:
# XXX due to bootstrapping reasons, we cannot use compileOption("gc", "stack") here
include "system/gc_regions"
elif defined(nimV2) or usesDestructors:
var allocator {.rtlThreadVar.}: MemRegion
instantiateForRegion(allocator)
when not defined(useNimRtl):
var allocator {.rtlThreadVar.}: MemRegion
instantiateForRegion(allocator)
when defined(gcHooks):
include "system/gc_hooks"
elif defined(gcMarkAndSweep):