diff options
author | Martin Storsjö <martin@martin.st> | 2020-11-09 16:43:47 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-11-17 01:11:28 +0300 |
commit | 920079edb1ead2f2cbeaf46fd6643ebb344b8b6b (patch) | |
tree | 2cf3b53d7f2b3547d335f97d8697101a140645db | |
parent | bcebc7bd89f550f2bd2694dc188cc9bf1eed9c8d (diff) |
meson: Handle the b_lto option as a string option for newer meson versions
Since 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d in meson (past the
0.56 release), the b_lto option was changed from a bool to a
tristate option (false/true/thin).
One could just compare the b_lto option against 'false', but that
causes warnings on older meson versions (on all existing releases).
-rw-r--r-- | tests/libfuzzer/meson.build | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/libfuzzer/meson.build b/tests/libfuzzer/meson.build index 3591403..bba47dc 100644 --- a/tests/libfuzzer/meson.build +++ b/tests/libfuzzer/meson.build @@ -72,8 +72,15 @@ dav1d_fuzzer_mt = executable('dav1d_fuzzer_mt', objcopy = find_program('objcopy', required: false) + +if meson.version().version_compare('<0.56.99') + lto = get_option('b_lto') ? 'true' : 'false' +else + lto = get_option('b_lto') +endif + if (objcopy.found() and - not get_option('b_lto') and + lto == 'false' and get_option('default_library') == 'static' and cc.has_function('posix_memalign', prefix : '#include <stdlib.h>', args : test_args)) |