parent
73e6b229aa
commit
036c52f0b6
3 changed files with 32 additions and 1 deletions
|
|
@ -567,7 +567,12 @@ proc loadDynamicLib(m: BModule, lib: PLib) =
|
|||
var p = newProc(nil, m)
|
||||
p.options = p.options - {optStackTrace, optEndb}
|
||||
var dest: TLoc
|
||||
initLocExpr(p, lib.path, dest)
|
||||
initLoc(dest, locTemp, lib.path, OnStack)
|
||||
dest.r = getTempName(m)
|
||||
appcg(m, m.s[cfsDynLibInit],"$1 $2;$n",
|
||||
[getTypeDesc(m, lib.path.typ), rdLoc(dest)])
|
||||
expr(p, lib.path, dest)
|
||||
|
||||
add(m.s[cfsVars], p.s(cpsLocals))
|
||||
add(m.s[cfsDynLibInit], p.s(cpsInit))
|
||||
add(m.s[cfsDynLibInit], p.s(cpsStmts))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue