diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-01-19 11:12:43 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2022-01-20 10:08:23 -0800 |
commit | 38c568775e19dd99d72d5564752ad27781a9a102 (patch) | |
tree | 021b83c222051d860346cdf7d278c2737254eea1 | |
parent | f9539d4128b30e0321b6d36a5abfb900f5593f3c (diff) | |
download | libdrm-38c568775e19dd99d72d5564752ad27781a9a102.tar.gz |
meson: use cc.has_function_attribute instead of open coding
It's less code, and also allows meson to short circuit for compilers is
knows don't support this.
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
-rw-r--r-- | meson.build | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 83bf29c3..e59fce5a 100644 --- a/meson.build +++ b/meson.build @@ -23,7 +23,7 @@ project( ['c'], version : '2.4.109', license : 'MIT', - meson_version : '>= 0.48', + meson_version : '>= 0.52', default_options : ['buildtype=debugoptimized', 'c_std=c99'], ) @@ -257,9 +257,7 @@ with_man_pages = get_option('man-pages') prog_rst2man = find_program('rst2man', 'rst2man.py', required: with_man_pages == 'true') with_man_pages = with_man_pages != 'false' and prog_rst2man.found() -config.set10('HAVE_VISIBILITY', - cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''', - name : 'compiler supports __attribute__(("hidden"))')) +config.set10('HAVE_VISIBILITY', cc.has_function_attribute('visibility:hidden')) foreach t : [ [with_exynos, 'EXYNOS'], |