diff options
| author | Sam James <sam@gentoo.org> | 2024-07-14 23:33:05 +0100 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-07-19 01:36:41 -0400 |
| commit | 7a306e1a46a91dadb77656a6998a8dcaa6482b8f (patch) | |
| tree | eaed74716dc509a9e1c3d73808175fd1160282db /test cases | |
| parent | 2548f921a29babe665593e5dcf401eb27aedd174 (diff) | |
| download | meson-7a306e1a46a91dadb77656a6998a8dcaa6482b8f.tar.gz | |
compilers: handle -Wno-attributes= for GCC
For other reasons, Meson transforms "-Wno-x" into "-Wx -Wno-x" for GCC,
but this breaks with "-Wno-attributes=x" with:
```
cc1plus: error: arguments ignored for '-Wattributes='; use '-Wno-attributes=' instead
```
Suppress that workaround for -Wno-attributes=.
Closes: https://github.com/mesonbuild/meson/issues/13022
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/common/104 has arg/meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/common/104 has arg/meson.build b/test cases/common/104 has arg/meson.build index ba0731111..c85ec9f25 100644 --- a/test cases/common/104 has arg/meson.build +++ b/test cases/common/104 has arg/meson.build @@ -52,6 +52,12 @@ if cc.get_id() == 'gcc' assert(not cc.has_multi_arguments(['-Wno-pragmas', '-Wno-lol-meson-test-flags']), 'should error out even if some -Wno args are valid') endif +if cpp.get_id() == 'gcc' and cpp.version().version_compare('>=12.1.0') + # Handle special -Wno-attributes=foo where -Wattributes=foo is invalid + # i.e. our usual -Wno-foo -Wfoo hack doesn't work for -Wattributes=foo. + assert(cpp.has_argument('-Wno-attributes=meson::i_do_not_exist')) +endif + if cc.get_id() == 'clang' and cc.version().version_compare('<=4.0.0') # 4.0.0 does not support -fpeel-loops. Newer versions may. # Please adjust above version number as new versions of clang are released. |
