mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 10:12:10 +01:00
build: Use C89 for the standard version check
The '90' version is for ISO C90, but Meson does not understand it. As far as GCC and Clang are concerned, `-std=c89` is exactly the same as `-std=c90`. As of VS 2017, MSVC supports `/std:c11` as the minimum version of the C standard, with C89 (plus Microsoft extensions) being the default. See: - GCC: https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/C-Dialect-Options.html - MSVC: https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-170#c-standards-support-1
This commit is contained in:
parent
62e27d2716
commit
1fb47422e9
@ -14,7 +14,7 @@ fs = import('fs')
|
||||
cc = meson.get_compiler('c')
|
||||
c_standards = {}
|
||||
|
||||
foreach std : ['90', '99', '11', '17']
|
||||
foreach std : ['89', '99', '11', '17']
|
||||
arg = (cc.get_id() == 'msvc' ? '/std:' : '-std=') + 'c' + std
|
||||
if cc.has_argument(arg)
|
||||
c_standards += { std: arg }
|
||||
|
Loading…
x
Reference in New Issue
Block a user