diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-03-02 17:18:21 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-03-05 00:37:57 +0530 |
commit | 5c14f98239038f3ba6a5a8f32f8c4b9490530dfe (patch) | |
tree | e390ca9bfc1da68a57822e0b6eeabd1a58b51523 | |
parent | 1210a67f66df15a54fc7c65f7406bcd5391d15aa (diff) | |
download | meson-5c14f98239038f3ba6a5a8f32f8c4b9490530dfe.zip meson-5c14f98239038f3ba6a5a8f32f8c4b9490530dfe.tar.gz meson-5c14f98239038f3ba6a5a8f32f8c4b9490530dfe.tar.bz2 |
Document the details of optimization+debug vs buildtype [skip ci]
Otherwise you have to hunt through the source code. Specifically, this
is defined in `mesonbuild/coredata.py`: `set_buildtype_from_others()`
and `set_others_from_buildtype()`
-rw-r--r-- | docs/markdown/Builtin-options.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index 067966f..9c8c54c 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -87,6 +87,23 @@ Using the option as-is with no prefix affects all machines. For example: | werror | false | Treat warnings as errors | no | | wrap_mode {default, nofallback,<br>nodownload, forcefallback} | default | Wrap mode to use | no | +For setting optimization levels and toggling debug, you can either set the +`buildtype` option, or you can set the `optimization` and `debug` options which +give finer control over the same. Whichever you decide to use, the other will +be deduced from it. For example, `-Dbuildtype=debugoptimized` is the same as +`-Ddebug=true -Doptimization=2` and vice-versa. This table documents the +two-way mapping: + +| buildtype | debug | optimization | +| --------- | ----- | ------------ | +| plain | false | 0 | +| debug | true | 0 | +| debugoptimized | true | 2 | +| release | false | 3 | +| minsize | true | s | + +All other combinations of `debug` and `optimization` set `buildtype` to `'custom'`. + ## Base options These are set in the same way as universal options, but cannot be shown in the |