tests: Mark tests as used so they don’t get removed at link time
Without this attribute, the test macros were making Weston fail to build with LTO enabled. Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
committed by
Daniel Stone
parent
0f4dbe72d3
commit
7092090de9
@@ -53,7 +53,7 @@ struct weston_test {
|
||||
static void func(void *); \
|
||||
\
|
||||
const struct weston_test test##name \
|
||||
__attribute__ ((section ("test_section"))) = \
|
||||
__attribute__ ((used, section ("test_section"))) = \
|
||||
{ \
|
||||
#name, func, data, size, n_elem, ret \
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user