fixes DLL generation
This commit is contained in:
parent
b15f323f03
commit
5e839d50b4
7 changed files with 56 additions and 49 deletions
|
|
@ -15,7 +15,7 @@ proc chckRange(i, a, b: int): int {.inline, compilerproc.}
|
|||
proc chckRangeF(x, a, b: float): float {.inline, compilerproc.}
|
||||
proc chckNil(p: pointer) {.inline, compilerproc.}
|
||||
|
||||
proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = discard
|
||||
proc nimFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = discard
|
||||
proc popFrame {.compilerRtl, inl.} = discard
|
||||
|
||||
proc setFrame(s: PFrame) {.compilerRtl, inl.} = discard
|
||||
|
|
|
|||
|
|
@ -44,9 +44,15 @@ var
|
|||
# a global variable for the root of all try blocks
|
||||
currException {.rtlThreadVar.}: ref E_Base
|
||||
|
||||
proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} =
|
||||
s.prev = framePtr
|
||||
framePtr = s
|
||||
when defined(nimRequiresNimFrame):
|
||||
proc nimFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} =
|
||||
s.prev = framePtr
|
||||
framePtr = s
|
||||
else:
|
||||
proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} =
|
||||
# XXX only for backwards compatibility
|
||||
s.prev = framePtr
|
||||
framePtr = s
|
||||
|
||||
proc popFrame {.compilerRtl, inl.} =
|
||||
framePtr = framePtr.prev
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ when defined(createNimRtl):
|
|||
{.pragma: inl.}
|
||||
{.pragma: compilerRtl, compilerproc, exportc: "nimrtl_$1", dynlib.}
|
||||
elif defined(useNimRtl):
|
||||
when hostOS == "windows":
|
||||
when defined(windows):
|
||||
const nimrtl* = "nimrtl.dll"
|
||||
elif hostOS == "macosx":
|
||||
elif defined(macosx):
|
||||
const nimrtl* = "nimrtl.dylib"
|
||||
else:
|
||||
const nimrtl* = "libnimrtl.so"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue