mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
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=94602 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:
parent
341bb12a0d
commit
4c920f0f5e
1 changed files with 2 additions and 2 deletions
|
|
@ -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 \
|
||||
}; \
|
||||
\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue