diff options
author | Dudemanguy <random342@airmail.cc> | 2023-01-31 16:38:38 -0600 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-02-01 13:26:09 -0800 |
commit | f2cb8e2ad57702c0381195f9c9c26f21a4ef8127 (patch) | |
tree | 74f1c236f920603155175e2539b97e6e97dbd48c | |
parent | 3729b6bcd4087217ad364bf2b84131880a01af40 (diff) | |
download | meson-f2cb8e2ad57702c0381195f9c9c26f21a4ef8127.zip meson-f2cb8e2ad57702c0381195f9c9c26f21a4ef8127.tar.gz meson-f2cb8e2ad57702c0381195f9c9c26f21a4ef8127.tar.bz2 |
add cc.has_function_attribute('vector_size')
-rw-r--r-- | docs/markdown/Reference-tables.md | 3 | ||||
-rw-r--r-- | mesonbuild/compilers/c_function_attributes.py | 2 | ||||
-rw-r--r-- | test cases/common/197 function attributes/meson.build | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index b81582c..f63a473 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -259,6 +259,7 @@ which are supported by GCC, Clang, and other compilers. | sentinelāµ | | unused | | used | +| vector_sizeā¶ | | visibility* | | visibility:defaultā | | visibility:hiddenā | @@ -281,6 +282,8 @@ which are supported by GCC, Clang, and other compilers. āµ *New in 0.63.0* +ā¶ *New in 1.1.0* + ### MSVC __declspec These values are supported using the MSVC style `__declspec` annotation, diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py index f663bfc..71ee9b2 100644 --- a/mesonbuild/compilers/c_function_attributes.py +++ b/mesonbuild/compilers/c_function_attributes.py @@ -100,6 +100,8 @@ C_FUNC_ATTRIBUTES = { 'int foo(void) __attribute__((unused));', 'used': 'int foo(void) __attribute__((used));', + 'vector_size': + '__attribute__((vector_size(32))); int foo(void) { return 0; }', 'visibility': ''' int foo_def(void) __attribute__((visibility("default"))); int foo_hid(void) __attribute__((visibility("hidden"))); diff --git a/test cases/common/197 function attributes/meson.build b/test cases/common/197 function attributes/meson.build index 4d43ecd..0d5c04e 100644 --- a/test cases/common/197 function attributes/meson.build +++ b/test cases/common/197 function attributes/meson.build @@ -53,6 +53,7 @@ attributes = [ 'sentinel', 'unused', 'used', + 'vector_size', 'warn_unused_result', 'weak', ] |