File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -142,8 +142,16 @@ By default, builds are stripped of symbols and debug information to save size.
142
142
To build a debuggable version of the Unix port, there are two options:
143
143
144
144
1 . Run ` make [other arguments] DEBUG=1 ` . Note setting ` DEBUG ` also reduces the
145
- optimisation level, so it's not a good option for builds that also want the
146
- best performance.
145
+ optimisation level and enables assertions , so it's not a good option for
146
+ builds that also want the best performance.
147
147
2 . Run ` make [other arguments] STRIP= ` . Note that the value of ` STRIP ` is
148
148
empty. This will skip the build step that strips symbols and debug
149
149
information, but changes nothing else in the build configuration.
150
+
151
+ ### Optimisation Level
152
+
153
+ The default compiler optimisation level is -Os, or -Og if ` DEBUG=1 ` is set.
154
+
155
+ Setting the variable ` COPT ` will explicitly set the optimisation level. For
156
+ example ` make [other arguments] COPT=-O0 DEBUG=1 ` will build a binary with no
157
+ optimisations, assertions enabled, and debug symbols.
You can’t perform that action at this time.
0 commit comments