unix: Add a description of COPT in the README.
This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
parent
d04974d8d0
commit
e370999e37
1 changed files with 10 additions and 2 deletions
|
|
@ -142,8 +142,16 @@ By default, builds are stripped of symbols and debug information to save size.
|
|||
To build a debuggable version of the Unix port, there are two options:
|
||||
|
||||
1. Run `make [other arguments] DEBUG=1`. Note setting `DEBUG` also reduces the
|
||||
optimisation level, so it's not a good option for builds that also want the
|
||||
best performance.
|
||||
optimisation level and enables assertions, so it's not a good option for
|
||||
builds that also want the best performance.
|
||||
2. Run `make [other arguments] STRIP=`. Note that the value of `STRIP` is
|
||||
empty. This will skip the build step that strips symbols and debug
|
||||
information, but changes nothing else in the build configuration.
|
||||
|
||||
### Optimisation Level
|
||||
|
||||
The default compiler optimisation level is -Os, or -Og if `DEBUG=1` is set.
|
||||
|
||||
Setting the variable `COPT` will explicitly set the optimisation level. For
|
||||
example `make [other arguments] COPT=-O0 DEBUG=1` will build a binary with no
|
||||
optimisations, assertions enabled, and debug symbols.
|
||||
|
|
|
|||
Loading…
Reference in a new issue