diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2022-01-25 20:30:40 +0100 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-01-26 19:22:17 -0500 |
commit | 57ce83b396a46a685ef1274c9f1af76c87b73c5a (patch) | |
tree | c6fa873288eda382567192cd4eef751a26b607e7 /test cases | |
parent | 88f8a8ea156b4839529221192819bde72a89a32d (diff) | |
download | meson-57ce83b396a46a685ef1274c9f1af76c87b73c5a.zip meson-57ce83b396a46a685ef1274c9f1af76c87b73c5a.tar.gz meson-57ce83b396a46a685ef1274c9f1af76c87b73c5a.tar.bz2 |
compilers/c_function_attributes: add retain
retain is a relatively young attribute which has proven itself useful
for working with --gc-sections -z start-stop-gc.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/197 function attributes/meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/common/197 function attributes/meson.build b/test cases/common/197 function attributes/meson.build index 9817309..9ec6388 100644 --- a/test cases/common/197 function attributes/meson.build +++ b/test cases/common/197 function attributes/meson.build @@ -80,6 +80,12 @@ if ['gcc', 'intel'].contains(c.get_id()) if c.get_id() == 'gcc' and c.version().version_compare('>= 7.0.0') attributes += 'fallthrough' endif + + # XXX(arsen): limited to clang 13+ even though gcc 11 has it, since gcc + # detects support for it at compile time based on binutils version + if c.get_id() == 'clang' and c.version().version_compare('>= 13.0.0') + attributes += 'retain' + endif endif if get_option('mode') == 'single' |