diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-09-22 23:11:59 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-09-22 23:11:59 +0300 |
commit | 0cf4a6ab3aa3672d74091e28f6535477794d9839 (patch) | |
tree | b0a2069e5e5bb28d8a92fe0c59d7f100128402d2 /docs/markdown/snippets/function_attributes.md | |
parent | d1f3f1d023566a54dfc65dc6067a0416b7353dff (diff) | |
download | meson-0.48.0.tar.gz |
Updated release note page.0.48.0
Diffstat (limited to 'docs/markdown/snippets/function_attributes.md')
-rw-r--r-- | docs/markdown/snippets/function_attributes.md | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/docs/markdown/snippets/function_attributes.md b/docs/markdown/snippets/function_attributes.md deleted file mode 100644 index 55144945a..000000000 --- a/docs/markdown/snippets/function_attributes.md +++ /dev/null @@ -1,29 +0,0 @@ -## Helper methods added for checking GNU style attributes: __attribute__(...) - -A set of new helpers have been added to the C and C++ compiler objects for -checking GNU style function attributes. These are not just simpler to use, they -may be optimized to return fast on compilers that don't support these -attributes. Currently this is true for MSVC. - -```meson -cc = meson.get_compiler('c') -if cc.has_function_attribute('aligned') - add_project_arguments('-DHAVE_ALIGNED', language : 'c') -endif -``` - -Would replace code like: - -```meson -if cc.compiles('''into foo(void) __attribute__((aligned(32)))''') - add_project_arguments('-DHAVE_ALIGNED', language : 'c') -endif -``` - -Additionally, a multi argument version has been added: - -```meson -foreach s : cc.get_supported_function_attributes(['hidden', 'alias']) - add_project_arguments('-DHAVE_@0@'.format(s.to_upper()), language : 'c') -endforeach -``` |