meson: Don't use get_option('buildtype')
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 3 Apr 2020 11:37:47 +0000 (17:07 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 3 Apr 2020 11:37:47 +0000 (17:07 +0530)
commit387b6df948a566ca8d6318b58029f66499ffb1c2
tree2327108973c2e12047b861257ef08cf577e17f9c
parent1f62fe1cbc8e489bc098854dce3cd21c44d8425e
meson: Don't use get_option('buildtype')

We should directly check the values of the `debug` and `optimization`
options instead.

`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
ext/vulkan/shaders/meson.build
meson.build
sys/d3d11/meson.build