forked from unikraft/unikraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.uk
218 lines (185 loc) · 5.57 KB
/
Config.uk
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
#
# For a description of the syntax of this configuration file,
# see https://www.kernel.org/doc/Documentation/kbuild/Config.in-language.txt.
#
mainmenu "Unikraft/$(UK_FULLVERSION) Configuration"
config UK_FULLVERSION
string
default "$(UK_FULLVERSION)"
config UK_CODENAME
string
default "$(UK_CODENAME)"
config UK_ARCH
string
default "x86_64" if ARCH_X86_64
default "arm64" if ARCH_ARM_64
default "arm" if ARCH_ARM_32
default "$(UK_ARCH)"
config NO_APP
def_bool $(shell,test $(UK_BASE) = $(UK_APP) && echo y || echo n)
config UK_BASE
string
default "$(UK_BASE)"
config UK_APP
string
default "$(UK_APP)"
config UK_DEFNAME
string
default "$(UK_NAME)"
menu "Architecture Selection"
source "$(UK_BASE)/arch/Config.uk"
endmenu
menu "Platform Configuration"
source "$(shell,$(UK_BASE)/support/scripts/uk_build_configure.sh -p '$(KCONFIG_PLAT_DIR)' -o '$(KCONFIG_PLAT_IN)')"
endmenu
menu "Library Configuration"
source "$(shell,$(UK_BASE)/support/scripts/uk_build_configure.sh -e '$(KCONFIG_LIB_DIR)' -o '$(KCONFIG_LIB_IN)')"
endmenu
menu "Build Options"
choice
prompt "Optimization level"
default OPTIMIZE_PERF
help
Set the optimization level for gcc
config OPTIMIZE_NONE
bool "No optimizations"
help
Do not optimize, use -O0.
config OPTIMIZE_PERF
bool "Optimize for performance"
help
Optimize code for performance,
config OPTIMIZE_SIZE
bool "Optimize for size"
help
Optimize code for size.
endchoice
comment "Hint: Specify a CPU type to get most benefits from performance optimization"
depends on OPTIMIZE_PERF && (MARCH_X86_64_GENERIC || MARCH_ARM64_GENERIC)
config OPTIMIZE_NOOMITFP
bool "Keep stack frame pointers"
default y
help
Reserves one CPU register for using it as stack frame pointer.
Functions are instrumented to save, set up, and restore frame
pointers. This option simplifies doing stack walks for
debugging for instance.
config OPTIMIZE_DEADELIM
bool "Drop unused functions and data"
default n
help
Drop unused functions and data. They will not be copied
into the final binary. This might save further space but linking time
will increase.
comment "Hint: Enable dropping of unused code to further reduce target image size"
depends on OPTIMIZE_SIZE && !OPTIMIZE_DEADELIM
config OPTIMIZE_LTO
bool "LTO - Link time optimizations (EXPERIMENTAL)"
default n
help
Enables GCC to do code optimizations during linking. This option
will increase overall building time but creates more efficient
Unikraft binaries.
choice
prompt "Debug information level"
default DEBUG_SYMBOLS_LVL3
help
Set the level of available debugging information.
config DEBUG_SYMBOLS_LVL0
bool "Level 0 (-g0), None"
help
No debugging information. This option is not recommended.
Building time is reduced.
config DEBUG_SYMBOLS_LVL1
bool "Level 1 (-g1)"
help
Minimal debugging information, enough
for making backtraces in parts of the program that
you don't plan to debug. This includes descriptions
of functions and external variables, but no information
about local variables and no line numbers.
config DEBUG_SYMBOLS_LVL2
bool "Level 2 (-g2)"
help
gcc's default setting
config DEBUG_SYMBOLS_LVL3
bool "Level 3 (-g3)"
help
Level 3 includes extra information, such as all the
macro definitions present in the program. Some debuggers
support macro expansion.
endchoice
comment "Hint: Keep frame pointers to ease debugging"
depends on !OPTIMIZE_NOOMITFP && !DEBUG_SYMBOLS_LVL0
config OPTIMIZE_WARNISERROR
bool "Treat warnings as errors"
default n
help
When this option is enabled, the build system stops
compilation when a compiler warning is displayed.
config OPTIMIZE_SYMFILE
bool "Create a symbols file"
default n
help
Create a separate file with all symbol locations
config OPTIMIZE_COMPRESS
bool "Compress images"
default y
help
Create compressed images. Please note that not all platforms
support compressing.
config RECORD_BUILDTIME
bool "Keep track of Building time"
default n
help
Record time (and resources) used by each build step
if RECORD_BUILDTIME
choice
prompt "Tool for recording"
default RECORD_BUILDTIME_TIME
help
Select which tool is used for recording the build steps
config RECORD_BUILDTIME_TIME
bool "time"
help
Use time command to record process statistics during building
config RECORD_BUILDTIME_LIFTOFF
bool "liftoff"
help
Use liftoff to record process statistics during building
Get it from https://github.com/sysml/liftoff
endchoice
endif
config CROSS_COMPILE
string "Custom cross-compiler tool prefix (optional)"
help
Same as running 'make CROSS_COMPILE=prefix-' but stored for
default make runs in this build directory. You don't
need to set this unless you want the configured build
directory to select the cross-compiler automatically.
config LLVM_TARGET_ARCH
string "Custom cross-compiler LLVM target (optional)"
help
Same as running 'make LLVM_TARGET_ARCH=target' but stored for
default make runs in this build directory. You don't
need to set this unless you want the configured build
directory to select the cross-compiler automatically.
This is used for LLVM based compilers such as clang or rustc.
#config PARALLEL_JOBS
# int "Number of jobs to run simultaneously (0 for auto)"
# default "0"
# help
# Number of jobs to run simultaneously. If 0, determine
# automatically according to number of CPUs on the host
# system.
endmenu
if !NO_APP
menu "Application Options"
source "$(shell,$(UK_BASE)/support/scripts/uk_build_configure.sh -a '$(KCONFIG_APP_DIR)')"
endmenu
endif
config UK_NAME
string "Image name"
default UK_DEFNAME
help
Name to be used for final image