-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
c: add -Wno-vla-larger-than to the exceptions for -Wno* #14252
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
Conversation
When supplying -Wno-vla-larger-than to compiler.get_supported_arguments, meson will inject -Wvla-larger-than as an argument which considered invalid by GCC, as the converse argument is -Wvla-larger-than=<value>. Just like CLikeCompiler._has_multi_arguments special-cases -Wno-attributes=, do the same for -Wno-vla-larger-than. Resolves: mesonbuild#14208 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| if arg.startswith('-Wno-attributes='): | ||
| pass | ||
| elif arg == '-Wno-vla-larger-than': | ||
| new_args.append('-Wvla-larger-than=1000') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 1000 specifically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wants a number, and I just put something that would make sense to pass. It is not used since the compiler does not see any VLA during this invocation.
Commit eca1ac1 (mesonbuild#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
Commit eca1ac1 (mesonbuild#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
Commit eca1ac1 (#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
Commit eca1ac1 (#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se> (cherry picked from commit e501a22)
Commit eca1ac1 (#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se> (cherry picked from commit e501a22)
When supplying -Wno-vla-larger-than to compiler.get_supported_arguments, meson will inject -Wvla-larger-than as an argument which considered invalid by GCC, as the converse argument is -Wvla-larger-than=.
Just like CLikeCompiler._has_multi_arguments special-cases -Wno-attributes=, do the same for -Wno-vla-larger-than.
Resolves: #14208