aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-runner.h
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2017-04-14 19:48:05 +0100
committerDaniel Stone <daniels@collabora.com>2017-12-01 16:56:02 +0000
commit4c920f0f5e591b066544cfda5a2b223ef46334a0 (patch)
tree4402e61680c317d56a5c40ba9257e44123f0e4fc /tests/test-runner.h
parenttests: Add one more indentation level to some macros (diff)
downloadwayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.tar
wayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.tar.gz
wayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.tar.bz2
wayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.tar.lz
wayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.tar.xz
wayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.tar.zst
wayland-4c920f0f5e591b066544cfda5a2b223ef46334a0.zip
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>
Diffstat (limited to 'tests/test-runner.h')
-rw-r--r--tests/test-runner.h4
1 files 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 \
}; \
\