trivial: don't use noclone attribute for cet checker on clang

Clang doesn't support this
This commit is contained in:
Mario Limonciello 2021-06-29 11:04:35 -05:00 committed by Mario Limonciello
parent 8867b1f47e
commit 4b80abafd8

View File

@ -27,10 +27,16 @@ shared_module('fu_plugin_cpu',
],
)
code = '''
#if !__has_attribute (__noclone__)
#error symver attribute not supported
#endif
static void __attribute__((noinline,noclone)) f(void) {}
'''
# verify the compiler knows what to do
if cc.has_argument('-fcf-protection')
build_fwupdcethelper = cc.compiles(
'static void __attribute__((noinline,noclone)) f(void) {}',
build_fwupdcethelper = cc.compiles(code,
name : '__attribute__((noinline,noclone))',
)
else