diff options
author | Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> | 2017-04-14 19:48:07 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2017-12-01 16:53:53 +0000 |
commit | 7092090de9f0f619272e52f65decdce86bc532f9 (patch) | |
tree | b82abaa873987e942cd1f5524a9fee22da28877b /tools/zunitc/inc/zunitc | |
parent | 0f4dbe72d36106027b448c31f45975c8c503bd15 (diff) | |
download | weston-7092090de9f0f619272e52f65decdce86bc532f9.tar.gz |
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>
Diffstat (limited to 'tools/zunitc/inc/zunitc')
-rw-r--r-- | tools/zunitc/inc/zunitc/zunitc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/zunitc/inc/zunitc/zunitc.h b/tools/zunitc/inc/zunitc/zunitc.h index 6ac6f391..16b211ba 100644 --- a/tools/zunitc/inc/zunitc/zunitc.h +++ b/tools/zunitc/inc/zunitc/zunitc.h @@ -268,7 +268,7 @@ zuc_set_output_junit(bool enable); static void zuctest_##tcase##_##test(void); \ \ const struct zuc_registration zzz_##tcase##_##test \ - __attribute__ ((section ("zuc_tsect"))) = \ + __attribute__ ((used, section ("zuc_tsect"))) = \ { \ #tcase, #test, 0, \ zuctest_##tcase##_##test, \ @@ -298,7 +298,7 @@ zuc_set_output_junit(bool enable); static void zuctest_##tcase##_##test(void *param); \ \ const struct zuc_registration zzz_##tcase##_##test \ - __attribute__ ((section ("zuc_tsect"))) = \ + __attribute__ ((used, section ("zuc_tsect"))) = \ { \ #tcase, #test, &tcase, \ 0, \ |