Do not build fwupdcethelper if noinline,noclone fails

This commit is contained in:
Richard Hughes 2021-05-14 11:48:17 +01:00
parent 7a8c61a5c3
commit 8bdd868c58

View File

@ -27,7 +27,17 @@ shared_module('fu_plugin_cpu',
],
)
# verify the compiler knows what to do
if cc.has_argument('-fcf-protection')
build_fwupdcethelper = cc.compiles(
'static void __attribute__((noinline,noclone)) f(void) {}',
name : '__attribute__((noinline,noclone))',
)
else
build_fwupdcethelper = false
endif
if build_fwupdcethelper
libfwupdcethelper = static_library('fwupdcethelper',
sources : [
'fu-cpu-helper-cet-common.c',