-
Notifications
You must be signed in to change notification settings - Fork 6
/
dub.sdl
44 lines (35 loc) · 1.31 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
name "gmp-d"
targetType "library"
description "High-level wrapper for GNU MP (GMP)"
authors "Per Nordlöw"
license "BSL-1.0"
copyright "Per Nordlöw"
# TODO: dependency "libgmp" version="~>1.0.0"
dflags "-vcolumns"
# dflags "-preview=dtorfields" "-preview=markdown" "-preview=in"
libs "gmp" "c"
targetPath "bin"
importPaths "src"
configuration "unittest" { # `redub` doesn't support custom `buildType`
versions "gmp_test"
buildOptions "unittests" "debugMode" "debugInfo"
dflags "-checkaction=context" "-allinst" "-preview=dip1000" # TODO: "-preview=dip1021"
dflags "-fsanitize=address" "-fsanitize=leak" platform="posix-ldc"
dflags "-Xcc=-fuse-ld=lld" # use better linker
}
buildType "unittest" {
versions "gmp_test"
buildOptions "unittests" "debugMode" "debugInfo"
dflags "-checkaction=context" "-allinst" "-preview=dip1000" # TODO: "-preview=dip1021"
dflags "-fsanitize=address" "-fsanitize=leak" platform="posix-ldc"
dflags "-Xcc=-fuse-ld=lld" # use better linker
}
buildType "release-unittest" {
versions "gmp_test"
buildOptions "releaseMode" "optimize" "inline" # TODO: -march=native -ffast-math
dflags "-checkaction=context" "-allinst" "-unittest"
}
buildType "release" {
buildOptions "releaseMode" "optimize" "inline" # TODO: -march=native -ffast-math
dflags "-flto=full" platform="posix-ldc"
}