meson/mesonbuild/compilers
Christoph Reiter 2d538c58cb Fix visibility attribute support check for GCC on Windows
has_function_attribute() depends on -Wattributes being emitted when an attribute
is not supported by the compiler. In case of GCC on Window (at least) there is no
warning in case the attribute is used on a declaration. Only once there is also a
function definition does it emit a warning like:

a.c: In function ‘foo’:
a.c:8:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
    8 | }

To fix this add a dummy function definition to all visibility compiler checks in meson.

The tests in "197 function attributes" only checked for positive return result on on-msvc
compilers, except one special case for dllexport/dllimport. Refactor the tests a bit so
one can specify also a negative expected result, and add tests for all visibility attribute
variants.
2023-11-04 23:36:03 -04:00
..
mixins fix ninja backend rules containing internal enum reprs 2023-10-20 18:07:05 -04:00
__init__.py compilers: don't export every compiler as a top-level property 2022-09-19 15:19:00 -04:00
asm.py add missing imports for future annotations 2023-10-20 18:07:05 -04:00
c.py c_std, cpp_std: Change to a list of desired versions in preference order 2023-08-07 08:28:00 -04:00
c_function_attributes.py Fix visibility attribute support check for GCC on Windows 2023-11-04 23:36:03 -04:00
compilers.py Fix traceback on AIX in shlib archiving code 2023-10-31 19:24:09 -04:00
cpp.py cpp: use -nostlib++ instead of -nostlib for custom cpp_stdlib 2023-10-12 20:15:42 +05:30
cs.py treewide: automatic rewriting of all comment-style type annotations 2023-08-11 13:41:03 -04:00
cuda.py Rename OptionOverrideProxy to OptionsView and move to coredata 2023-09-07 06:55:07 -04:00
cython.py cython: wire up support for emitting and using depfiles 2023-02-10 02:16:53 -05:00
d.py Remove duplicated code to canonicalize b_vscrt option value 2023-10-19 08:13:57 -04:00
detect.py compilers: fix compiler detection when the "ccache" string is in the path 2023-09-01 02:09:21 -04:00
fortran.py Annotate naked fundamental Python types 2023-07-12 18:56:06 -05:00
java.py fix bug where all java builds & tests fail to run SanityCheck on JDK11 2023-09-25 18:27:24 +03:00
objc.py linkers: delay implementations import until detect is run 2023-06-26 13:10:33 -04:00
objcpp.py objective-c++: add support for current supported standards in Apple Clang 2023-09-21 12:41:39 +03:00
rust.py rust: Always link dll and exe with the correct vscrt 2023-10-19 08:13:57 -04:00
swift.py treewide: automatic rewriting of all comment-style type annotations 2023-08-11 13:41:03 -04:00
vala.py fix implicit_reexport issues and enforce them going forward 2023-07-19 18:31:37 -04:00