-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakePresets.json
More file actions
223 lines (223 loc) · 7.82 KB
/
Copy pathCMakePresets.json
File metadata and controls
223 lines (223 loc) · 7.82 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 25,
"patch": 0
},
"configurePresets": [
{
"name": "x86_64-base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"toolchainFile": "${sourceDir}/cmake/toolchains/x86_64-kernel.cmake",
"cacheVariables": {
"DUETOS_ARCH": "x86_64",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "x86_64-debug",
"displayName": "x86_64 kernel + userland, debug",
"inherits": "x86_64-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"DUETOS_GDB_SERVER": "ON",
"DUETOS_ENABLE_UBSAN": "ON",
"DUETOS_KASAN": "ON",
"DUETOS_CAP_AUDIT": "Full",
"DUETOS_SHELL_SELFTEST": "ON"
}
},
{
"name": "x86_64-release",
"displayName": "x86_64 kernel + userland, release",
"inherits": "x86_64-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86_64-debug-ubsan",
"displayName": "x86_64 kernel + userland, debug + UBSAN",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_ENABLE_UBSAN": "ON"
}
},
{
"name": "x86_64-debug-asan",
"displayName": "x86_64 kernel + userland, debug + ASAN-equivalent (in-tree KASAN diagnostics)",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_KASAN": "ON"
}
},
{
"name": "x86_64-debug-san",
"displayName": "x86_64 debug + full sanitizer suite (UBSAN + integer family + ASAN-equiv + audits)",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_ENABLE_UBSAN": "ON",
"DUETOS_ENABLE_UBSAN_INTEGER": "ON",
"DUETOS_KASAN": "ON",
"DUETOS_LOCK_ORDER_AUDIT": "ON",
"DUETOS_CAP_AUDIT": "Full"
}
},
{
"name": "x86_64-debug-conv",
"displayName": "x86_64 debug + integer-conversion audit (-Wconversion/-Wsign-conversion, non-fatal)",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_ENABLE_CONVERSION_AUDIT": "ON"
}
},
{
"name": "x86_64-debug-ubsan-trap",
"displayName": "x86_64 debug + UBSAN in trap mode (fail-fast: first UB → #UD, no log runtime)",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_ENABLE_UBSAN": "ON",
"DUETOS_UBSAN_TRAP": "ON"
}
},
{
"name": "x86_64-debug-redteam",
"displayName": "x86_64 debug + AttackSim red-team suite (escalates guards; not a normal-boot build)",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_ATTACK_SIM": "ON"
}
},
{
"name": "x86_64-release-asserts",
"displayName": "x86_64 release with KASSERT + UBSAN runtime kept on (paranoid release)",
"inherits": "x86_64-release",
"cacheVariables": {
"DUETOS_ASSERTS": "ON",
"DUETOS_ENABLE_UBSAN": "ON",
"DUETOS_CAP_AUDIT": "Sample"
}
},
{
"name": "x86_64-release-audit",
"displayName": "x86_64 release with full cap-gate + lock-order audit (forensic release)",
"inherits": "x86_64-release",
"cacheVariables": {
"DUETOS_CAP_AUDIT": "Full",
"DUETOS_LOCK_ORDER_AUDIT": "ON",
"DUETOS_BOOT_SELFTESTS": "ON",
"DUETOS_KLOG_DEFAULT": "1",
"DUETOS_KLOG_COMPILE_FLOOR": "0"
}
},
{
"name": "x86_64-debug-fast",
"displayName": "x86_64 debug with cheaper instrumentation (faster boot, debuggable)",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_LOCK_ORDER_AUDIT": "OFF",
"DUETOS_CAP_AUDIT": "Sample",
"DUETOS_BOOT_SELFTESTS": "ON",
"DUETOS_ASSERTS": "ON"
}
},
{
"name": "x86_64-kasan",
"displayName": "x86_64 kernel + userland, debug + KASAN-equivalent diagnostics",
"inherits": "x86_64-debug",
"cacheVariables": {
"DUETOS_KASAN": "ON",
"DUETOS_ENABLE_UBSAN": "ON",
"DUETOS_LOCK_ORDER_AUDIT": "ON",
"DUETOS_CAP_AUDIT": "Full"
}
},
{
"name": "x86_64-debug-kasan",
"displayName": "x86_64 debug + KASAN-equivalent diagnostics (compatibility alias)",
"inherits": "x86_64-kasan"
},
{
"name": "x86_64-release-lto",
"displayName": "x86_64 release with ThinLTO (cross-TU inlining; slower link)",
"inherits": "x86_64-release",
"cacheVariables": {
"DUETOS_LTO": "ON"
}
},
{
"name": "x86_64-release-karl",
"displayName": "x86_64 release with KARL (object-order link randomization, OpenBSD-style)",
"description": "Randomizes the per-TU object link order at configure time so every build produces a kernel ELF with different in-image symbol offsets. Strict complement to KASLR (which randomizes the BASE at boot). Seed is drawn from the DUETOS_KARL_SEED env var if set, else a string(RANDOM) value at configure time. The seed is baked into the boot banner and a sidecar kernel.symbols map is emitted next to the ELF so a panic dump can be decoded against the build that produced it.",
"inherits": "x86_64-release",
"cacheVariables": {
"DUETOS_KARL": "ON"
}
}
],
"buildPresets": [
{
"name": "x86_64-debug",
"configurePreset": "x86_64-debug"
},
{
"name": "x86_64-release",
"configurePreset": "x86_64-release"
},
{
"name": "x86_64-debug-ubsan",
"configurePreset": "x86_64-debug-ubsan"
},
{
"name": "x86_64-debug-asan",
"configurePreset": "x86_64-debug-asan"
},
{
"name": "x86_64-debug-san",
"configurePreset": "x86_64-debug-san"
},
{
"name": "x86_64-debug-conv",
"configurePreset": "x86_64-debug-conv"
},
{
"name": "x86_64-debug-ubsan-trap",
"configurePreset": "x86_64-debug-ubsan-trap"
},
{
"name": "x86_64-debug-redteam",
"configurePreset": "x86_64-debug-redteam"
},
{
"name": "x86_64-release-asserts",
"configurePreset": "x86_64-release-asserts"
},
{
"name": "x86_64-release-audit",
"configurePreset": "x86_64-release-audit"
},
{
"name": "x86_64-debug-fast",
"configurePreset": "x86_64-debug-fast"
},
{
"name": "x86_64-kasan",
"configurePreset": "x86_64-kasan"
},
{
"name": "x86_64-debug-kasan",
"configurePreset": "x86_64-debug-kasan"
},
{
"name": "x86_64-release-lto",
"configurePreset": "x86_64-release-lto"
},
{
"name": "x86_64-release-karl",
"configurePreset": "x86_64-release-karl"
}
]
}