meson.build: disable the deprecated symbols test with LTO - #174
Conversation
If I understand this correctly: - our deprecated symbols are remapped into a specific library version - nothing in the test calls those symbols, so they're optimized away (they end up as local symbols) - our test uses asm to link to those functions but by then they're already gone Rather than fixing this let's just disable the test, it doesn't provide us with anything useful in the LTO condition anyway. Fixes linuxwacom#152 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
This solution is kind of wrong. Why? Because assumes that someone will be using LTO by specify in meson options -D b_lto=enable. In reality it is possible to use LTO with meson completely transparently by passing all necessary options in AR, NM, RANLIB, CFLAGS and LDFLAGS environment variables. Other thing is that implementing LTO in this PR way assumes that someone will be using gcc. Build framework should not be assuming use any any type of the compiler. All what is necessary to do here is possible to pass over above env variables. IMO it should be only meson option to disable those tests if there is no other way to fix that issue. |
|
it's always possible to pass/modify/hack the build process with various scripts and environment variables. That's a moving target we cannot maintain though. Plus, if you control the environment to that level in your build process, you can also patch the code to change what's being built. We already have an option to disable tests ( |
|
Correct me if I'm wrong AFAIK -Dtests=false disables all tests or only those affected by LTO. Still I'm not sure what is exact cause that that test usnit is failing with LTO. gcc/ld bug? Because if it is like this dicussing that issue here is a bit pointless. |
Correct, it disables everything.
Have a look at the source of the test. The test:
So it's a hacky test but it works. Whatever LTO does exactly, it seems to ignore the |
If I understand this correctly:
up as local symbols)
gone
Rather than fixing this let's just disable the test, it doesn't provide us
with anything useful in the LTO condition anyway.
Fixes #152