diff options
author | Tristan Partin <tristan@partin.io> | 2022-05-19 13:33:14 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-05-19 15:05:53 -0400 |
commit | 5d438b6aedbb074c06f6f9fa2f7972b422ccd1bd (patch) | |
tree | d0ac85a2e428fc3fdd89148cb6716128e8d5d0ab /mesonbuild/compilers/c_function_attributes.py | |
parent | 8afdecb039c927b5ddea6533789d956dd51a7882 (diff) | |
download | meson-5d438b6aedbb074c06f6f9fa2f7972b422ccd1bd.zip meson-5d438b6aedbb074c06f6f9fa2f7972b422ccd1bd.tar.gz meson-5d438b6aedbb074c06f6f9fa2f7972b422ccd1bd.tar.bz2 |
Add cc.has_function_attribute('section')
Diffstat (limited to 'mesonbuild/compilers/c_function_attributes.py')
-rw-r--r-- | mesonbuild/compilers/c_function_attributes.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py index ac145d8..faa6570 100644 --- a/mesonbuild/compilers/c_function_attributes.py +++ b/mesonbuild/compilers/c_function_attributes.py @@ -88,6 +88,12 @@ C_FUNC_ATTRIBUTES = { 'int foo(void) __attribute__((pure));', 'returns_nonnull': 'int *foo(void) __attribute__((returns_nonnull));', + 'section': ''' + #if defined(__APPLE__) && defined(__MACH__) + extern int foo __attribute__((section("__BAR,__bar"))); + #else + extern int foo __attribute__((section(".bar"))); + #endif''', 'unused': 'int foo(void) __attribute__((unused));', 'used': |