X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=meson.build;h=e5632607a9bd12cef04147bb4b4cbc0bbf02a3a9;hb=cbecd483f57c465b2ad6d3867c760c2e5b5e79aa;hp=0c79ddf04c98608ebdd7125834ada46a176fdc96;hpb=97c57726bc81c979386c623ad7586c2677fdd865;p=plocate 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