-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dub.sdl
56 lines (43 loc) · 1.39 KB
/
dub.sdl
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
name "minijson"
description "Minify JSON files"
authors "Amin Yahyaabadi"
copyright "Copyright © 2021, Amin Yahyaabadi"
license "MIT"
targetPath "./dist"
sourcePaths "./src/native"
importPaths "./src/native"
dependency "automem" version="0.6.7"
dependency "despacer" path="despacer"
dependency "d-glob" version="~>0.4.0"
dependency "argparse" version="~>1.3.0"
preGenerateCommands "git submodule update --init" # despacer download
configuration "executable" {
targetType "executable"
mainSourceFile "./src/native/cli.d"
}
configuration "library" {
targetType "library"
targetName "minijson"
}
configuration "benchmark" {
targetType "executable"
targetName "minijson-benchmark"
mainSourceFile "./benchmark/benchmark.d"
excludedSourceFiles "src/native/cli.d" "src/native/libc.d"
}
# -------- Build Options and configurations --------
// dflags "-vgc"
buildType "release-nobounds" {
buildOptions "releaseMode" "optimize" "inline" "noBoundsCheck"
# link time optimizations
dflags "--flto=full" "--ffast-math" platform="windows-ldc"
dflags "--flto=full" "--ffast-math" platform="linux-ldc"
}
buildType "debug-sanitize-address" platform="ldc" {
dflags "--fsanitize=address" "--link-defaultlib-debug"
buildOptions "debugMode" "debugInfo"
}
buildType "debug-sanitize-memory" platform="ldc" {
dflags "--fsanitize=memory" "--link-defaultlib-debug"
buildOptions "debugMode" "debugInfo"
}