-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnnie.nims
65 lines (53 loc) · 1.34 KB
/
Annie.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import version
--mm:arc
--define:useMalloc
--passL:"-static"
--cc:clang
--threads:on
--styleCheck:hint
func lto() =
--passC:"-flto"
--passL:"-flto"
if defined(windows):
--passL:"-fuse-ld=lld"
func highPerformance() =
--panics:on
--define:danger
lto()
func debuggerProfilerInfo() =
--passC:"-fno-omit-frame-pointer -g"
--debugger:native
let suffix = if defined(windows): ".exe" else: ""
let name = projectName() & "-" & version()
task debug, "debug compile":
--define:debug
--passC:"-O2"
debuggerProfilerInfo()
switch("o", name & "-debug" & suffix)
setCommand "c"
task checks, "checks compile":
--define:release
debuggerProfilerInfo()
switch("o", name & "-checks" & suffix)
setCommand "c"
task profile, "profile compile":
highPerformance()
debuggerProfilerInfo()
switch("o", name & "-profile" & suffix)
setCommand "c"
task default, "default compile":
highPerformance()
switch("o", name & suffix)
setCommand "c"
task native, "native compile":
highPerformance()
--passC:"-march=native"
--passC:"-mtune=native"
switch("o", name & "-native" & suffix)
setCommand "c"
task modern, "BMI2 and POPCNT compile":
highPerformance()
--passC:"-mbmi2"
--passC:"-mpopcnt"
switch("o", name & "-modern" & suffix)
setCommand "c"