-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.nims
33 lines (26 loc) · 951 Bytes
/
config.nims
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import std / [os, strutils]
switch("gc", "orc")
switch("tlsEmulation", "off")
switch("define", "useMalloc")
switch("define", "host")
# switch("define", "nimArcDebug")
let
thirdPartyPath = projectDir() / ".." / "thirdparty"
mimallocPath = thirdPartyPath / "mimalloc"
mimallocStatic = "mimallocStatic=\"" & (mimallocPath / "src" / "static.c") & '"'
mimallocIncludePath = "mimallocIncludePath=\"" & (mimallocPath / "include") & '"'
switch("define", mimallocStatic)
switch("define", mimallocIncludePath)
switch("define", "host")
switch("define", "debug")
switch("path", thirdPartyPath)
switch("path", thirdPartyPath / "winim")
switch("path", thirdPartyPath / "sokol-nim" / "src")
switch("path", thirdPartyPath / "laser")
patchFile("stdlib", "malloc", "alloc")
when defined Windows:
switch("cc", "vcc")
switch("passC", "/Zi /FS /Od")
switch("passL", "/Zi /FS /Od")
# switch("passC", "/fsanitize=address")
# switch("verbosity", "3")