Commit 4c920f0f authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot Committed by Daniel Stone

tests: Mark tests used so they don’t get removed at link time

Without this attribute, these macros were making Weston’s tests fail to
build with LTO enabled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94602Signed-off-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: default avatarEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Tested-by: default avatarEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent 341bb12a
......@@ -41,7 +41,7 @@ struct test {
static void name(void); \
\
const struct test test##name \
__attribute__ ((section ("test_section"))) = { \
__attribute__ ((used, section ("test_section"))) = { \
#name, name, 0 \
}; \
\
......@@ -51,7 +51,7 @@ struct test {
static void name(void); \
\
const struct test test##name \
__attribute__ ((section ("test_section"))) = { \
__attribute__ ((used, section ("test_section"))) = { \
#name, name, 1 \
}; \
\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment