meson: replace vector code compile check with function attribute check

Makes it a nice one liner.
This commit is contained in:
Dudemanguy 2024-09-23 19:10:02 -05:00
parent b52a67dde2
commit 92e97d239e
1 changed files with 1 additions and 9 deletions

View File

@ -569,15 +569,7 @@ features += {'bsd-fstatfs': cc.has_function('fstatfs', prefix: '#include <sys/mo
features += {'linux-fstatfs': cc.has_function('fstatfs', prefix: '#include <sys/vfs.h>')}
vector_attribute = '''int main() {
float v __attribute__((vector_size(32)));
}
'''
vector = get_option('vector').require(
cc.compiles(vector_attribute, name: 'vector check'),
error_message: 'the compiler does not support gcc vectors!',
)
features += {'vector': vector.allowed()}
features += {'vector': cc.has_function_attribute('vector_size', required: get_option('vector'))}
sources += path_source + timer_source