fixes usenimrtl with useMalloc (#24804)

Follow up https://github.com/nim-lang/Nim/pull/19512

ref https://github.com/nim-lang/Nim/issues/24794

Otherwise, `/Users/blue/Desktop/Nim/lib/system/mm/malloc.nim(4, 1)
Error: redefinition of 'allocImpl'; previous declaration here:
/Users/blue/Desktop/Nim/lib/system/memalloc.nim(51, 8)`

In `proc allocImpl*(size: Natural): pointer {.noconv, rtl, tags: [],
benign, raises: [].}`, `rtl` means it is an `importc` function instead
of a proc forward decl.

(cherry picked from commit d15705e05b)
This commit is contained in:
ringabout
2025-03-25 05:52:43 +08:00
committed by narimiran
parent 346b989b5d
commit e68a91c8df

View File

@@ -55,7 +55,8 @@ elif defined(gogc):
include system / mm / go
elif (defined(nogc) or defined(gcDestructors)) and defined(useMalloc):
include system / mm / malloc
when not defined(useNimRtl):
include system / mm / malloc
when defined(nogc):
proc GC_getStatistics(): string = ""