-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation fails when overriding default_option c_std
#8360
Comments
This is one of those, danged whatever you do situations. What happened was that we enforced the c standard options for some compilers, but not all compilers. We're now enforcing it for all compilers. The second part though, that setting the default value to something invalid, then overriding it something valid and that not working is not good, and I can replicate that. |
This is a) useless because it's only used to print which options are not default, and b) harmful because it can result in cases where things break, like in projects that set a standard that the chosen compiler doesn't support, but the project (or some subset) can be built with a different standard. Fixes: mesonbuild#8360
This is a) useless because it's only used to print which options are not default, and b) harmful because it can result in cases where things break, like in projects that set a standard that the chosen compiler doesn't support, but the project (or some subset) can be built with a different standard. Fixes: mesonbuild#8360
Aah, the first part was just flavour to point out the use case - I think the better enforcement for all compilers makes sense. Thanks for looking into the regression :) |
This is a) useless because it's only used to print which options are not default, and b) harmful because it can result in cases where things break, like in projects that set a standard that the chosen compiler doesn't support, but the project (or some subset) can be built with a different standard. Fixes: #8360
This is a) useless because it's only used to print which options are not default, and b) harmful because it can result in cases where things break, like in projects that set a standard that the chosen compiler doesn't support, but the project (or some subset) can be built with a different standard. Fixes: #8360
This is a) useless because it's only used to print which options are not default, and b) harmful because it can result in cases where things break, like in projects that set a standard that the chosen compiler doesn't support, but the project (or some subset) can be built with a different standard. Fixes: mesonbuild#8360
Describe the bug
Hi, when bumping our internal meson git to the latest version, I noticed that meson now enforces the
c_std
set by a project.The CompCert support I added only claims
c89
andc99
, which is close enough to the truth (there are some exceptions, see https://compcert.org/compcert-C.html if curious). However, when building the picolibc I now get into trouble because it sets thec_std
tognu99
in thedefault_options
. Generally speaking, this is also quite true, but at least for our config I removed all GNU-isms.So I now end up with this:
And can't override it. I tried
-Dc_std=c99
, but then it just fails at a later point (seems like after running the whole "configure" script):Same for the minimal, native example below. I suppose this might be a bug?
OTOH, if I'm doing it wrong I'm happy to be pointed out on how to achieve my goal :)
To Reproduce
Consider this simple project,
meson.build
file:source in
hello.c
(doesn't matter):Calling only
meson $project_src
, I get the following error:This is expected, as my system GCC (10.2.0, x86_64) doesn't support the non-existent C language standard
foobar99
.However, when overriding the value by calling ``meson $project_src -Dc_std=c99`, I get more output - but it still fails:
Hence the title, Validation fails when overriding default_option
c_std
.Expected behavior
The hello world project is build.
system parameters
The text was updated successfully, but these errors were encountered: