From 27d93fde59be258d9e113ca09ece3c0527b289ec Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 17 Oct 2020 14:33:12 +0200 Subject: [PATCH] Fix the function multiversioning Meson test. The old one was seemingly too lenient, and would have false positives. --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0c79ddf..e563260 100644 --- a/meson.build +++ b/meson.build @@ -15,7 +15,9 @@ endif # Function multiversioning is x86-only _and_ not available on certain targets # (they need “ifunc”, indirect functions, a GNU extension). -code = '__attribute__((target("default"))) void func();' +code = '''__attribute__((target("default"))) void foo(); +__attribute__((target("sse2"))) void foo(); +void bar() { foo(); }''' if cxx.compiles(code, name: 'function multiversioning') add_project_arguments('-DHAS_FUNCTION_MULTIVERSIONING', language: 'cpp') endif -- 2.39.2