Skip to content

meson: Fix buildtype usage

Nirbheek Chauhan requested to merge nirbheek/glib:fix-buildtype-usage into master

commit e7cfe62e:

meson: Fix check for builtype arguments
`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

commit b462e2c8:

meson: Use the b_vscrt option for selecting the CRT
This option has been available since 0.48, and we should use it
instead of only guessing based on buildtype.

This happened because the glib meson port was done before these options were available (in 2018 or so). But these options have always been available in the minimum version of Meson we support.

Merge request reports