mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
@@ -2180,7 +2180,10 @@ proc finalCodegenActions*(graph: ModuleGraph; m: BModule; n: PNode): PNode =
|
||||
|
||||
if m.hcrOn:
|
||||
# make sure this is pulled in (meaning hcrGetGlobal() is called for it during init)
|
||||
cgsym(m, "programResult")
|
||||
let sym = magicsys.getCompilerProc(m.g.graph, "programResult")
|
||||
# ignore when not available, could be a module imported early in `system`
|
||||
if sym != nil:
|
||||
cgsymImpl m, sym
|
||||
if m.inHcrInitGuard:
|
||||
endBlock(m.initProc)
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string, isOrc =
|
||||
testSpec r, makeTest("tests/dll/client.nim", options & " --threads:on" & rpath, cat)
|
||||
testSpec r, makeTest("tests/dll/nimhcr_unit.nim", options & " --threads:off" & rpath, cat)
|
||||
testSpec r, makeTest("tests/dll/visibility.nim", options & " --threads:off" & rpath, cat)
|
||||
testSpec r, makeTest("tests/dll/nimhcr_basic.nim", options & " --threads:off" & rpath, cat)
|
||||
|
||||
if "boehm" notin options:
|
||||
# force build required - see the comments in the .nim file for more details
|
||||
|
||||
7
tests/dll/nimhcr_basic.nim
Normal file
7
tests/dll/nimhcr_basic.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
discard """
|
||||
output: '''
|
||||
Hello world
|
||||
'''
|
||||
"""
|
||||
|
||||
echo "Hello world"
|
||||
Reference in New Issue
Block a user