blob: 7441e5398270bdcda779796960773c64f4b0bf33 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
discard """
joinable: false
"""
import stdtest/specialpaths
import std/[osproc, strformat, os]
const
nim = getCurrentCompilerExe()
buildLib = buildDir / "libD20220923T19380"
currentDir = splitFile(currentSourcePath).dir
file = currentDir / "m15955.nim"
main = currentDir / "m15955_main.nim"
proc runCmd(cmd: string) =
let (msg, code) = execCmdEx(cmd)
doAssert code == 0, msg
runCmd fmt"{nim} c -o:{buildLib} --nomain --nimMainPrefix:libA -f --app:staticlib {file}"
runCmd fmt"{nim} c -r {main}"
|