[PATCH wayland 2/4] tests: Mark tests as used, so they don’t get removed at link-time.
Emmanuel Gil Peyrot
emmanuel.peyrot at collabora.com
Fri Apr 14 18:48:05 UTC 2017
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 at trippelsdorf.de>
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
---
tests/test-runner.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test-runner.h b/tests/test-runner.h
index c7a84aa..81ed034 100644
--- a/tests/test-runner.h
+++ b/tests/test-runner.h
@@ -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 \
}; \
\
--
2.12.2
More information about the wayland-devel
mailing list