]> git.99rst.org Git - git.git/commit
meson: reformat default options to workaround bug in `meson configure`
authorEli Schwartz <redacted>
Mon, 19 May 2025 17:09:42 +0000 (13:09 -0400)
committerJunio C Hamano <redacted>
Mon, 19 May 2025 18:32:27 +0000 (11:32 -0700)
commitcddcee7f64263922770bbe5c528ba6af4bf81fb5
treec27a20dedfb87f36af7a56ab4fdadee27bd29b86
parentd50a5e8939abfc07c2ff97ae72e9330939b36ee0
meson: reformat default options to workaround bug in `meson configure`

Since 13cb20fc46 ("meson: fix compilation with Visual Studio",
2025-01-22) it has not been possible to list build options via `meson
configure`. This is due to Meson's static analysis of build options
failing to handle constant folding, and thinking we set a totally
invalid default `-std=`.

This is reported upstream but we anyways need to work with existing
versions. It turns out there is a simple solution: turn the entire
default option into a conditional branch, which means Meson sees either
nothing, or everything.

As a result, Git users can once again see pretty-printed options before
building.

Reported-by: Ramsay Jones <redacted>
Bug: https://github.com/mesonbuild/meson/issues/14623
Signed-off-by: Eli Schwartz <redacted>
Signed-off-by: Junio C Hamano <redacted>
meson.build
git clone https://git.99rst.org/PROJECT