aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2022-01-25 20:30:40 +0100
committerEli Schwartz <eschwartz93@gmail.com>2022-01-26 19:22:17 -0500
commit57ce83b396a46a685ef1274c9f1af76c87b73c5a (patch)
treec6fa873288eda382567192cd4eef751a26b607e7 /mesonbuild/compilers
parent88f8a8ea156b4839529221192819bde72a89a32d (diff)
downloadmeson-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 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/c_function_attributes.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py
index f31229e..ac145d8 100644
--- a/mesonbuild/compilers/c_function_attributes.py
+++ b/mesonbuild/compilers/c_function_attributes.py
@@ -113,6 +113,7 @@ C_FUNC_ATTRIBUTES = {
'weakref': '''
static int foo(void) { return 0; }
static int var(void) __attribute__((weakref("foo")));''',
+ 'retain': '__attribute__((retain)) int x;',
}
CXX_FUNC_ATTRIBUTES = {