-
Notifications
You must be signed in to change notification settings - Fork 0
/
dub.sdl
45 lines (38 loc) · 1.42 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
name "tscherm"
targetType "staticLibrary"
dependency "bindbc-idf" version="~master" repository="git+https://github.com/Reavershark/bindbc-idf"
dependency "nobetterc" version="~master" repository="git+https://github.com/Reavershark/nobetterc"
subConfiguration "nobetterc" "classes"
buildRequirements "allowWarnings" // Allow unknown target warning
// General flags
dflags \
"--checkaction=C" \
"--linkonce-templates" \
"--fno-moduleinfo"
// Preview flags
dflags \
"--preview=dip1000" \
"--preview=dip1008" \
"--preview=dip1021" \
"--preview=bitfields" \
"--preview=fixAliasThis" \
"--preview=fixImmutableConv" \
"--preview=rvaluerefparam" \
"--preview=in"
// Build idf project
preGenerateCommands \
"cd idf-project/${DUB_BUILD_TYPE} && ([ -f build/config/sdkconfig.h ] || idf.py configure) || true"
postBuildCommands \
"rm idf-project/${DUB_BUILD_TYPE}/dcode.a &>/dev/null || true" \
"(echo lib${DUB_PACKAGE}.a && dub describe --data=linker-files) | xargs ar -rcT idf-project/${DUB_BUILD_TYPE}/dcode.a" \
"cd idf-project/${DUB_BUILD_TYPE} && idf.py build"
// ImportC preprocessor flags
buildType "debug" {
dflags "--gc" // Generate C-like debug info
dflags "-P-I${PACKAGE_DIR}/idf-project/debug/build/config"
}
buildType "release" {
dflags "-P-I${PACKAGE_DIR}/idf-project/release/build/config"
buildOptions "releaseMode" "optimize" "inline" "noBoundsCheck"
dflags "-O4"
}