diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-28 11:47:14 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-28 19:10:30 +0300 |
commit | 8dd2e42de3cc1be535fcef4bc43f413dff33f20d (patch) | |
tree | 7e3960de8a8389debe1eae308922aa8ef7f8d042 /run_unittests.py | |
parent | 234bb45b025700182d942b8f8421bc78f4cd7d4e (diff) | |
download | meson-8dd2e42de3cc1be535fcef4bc43f413dff33f20d.zip meson-8dd2e42de3cc1be535fcef4bc43f413dff33f20d.tar.gz meson-8dd2e42de3cc1be535fcef4bc43f413dff33f20d.tar.bz2 |
CompilerArgs: -Wl,-lfoo is also a valid way to pass a library
Treat it the same as -lfoo by deduping and adding to --start/end-group
Reported at https://gitlab.gnome.org/GNOME/glib/issues/1496
We don't do any advanced transformation for MSVC or de-dup because
this is a very rare syntax.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index c1aa8de..16eee3e 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -284,6 +284,9 @@ class InternalTests(unittest.TestCase): # Adding a non-library argument doesn't include it in the group l += ['-Lfoo', '-Wl,--export-dynamic'] self.assertEqual(l.to_native(copy=True), ['-Lfoo', '-Lfoodir', '-Wl,--start-group', '-lfoo', '-Lbardir', '-lbar', '-lbar', '/libbaz.a', '-Wl,--end-group', '-Wl,--export-dynamic']) + # -Wl,-lfoo is detected as a library and gets added to the group + l.append('-Wl,-ldl') + self.assertEqual(l.to_native(copy=True), ['-Lfoo', '-Lfoodir', '-Wl,--start-group', '-lfoo', '-Lbardir', '-lbar', '-lbar', '/libbaz.a', '-Wl,--export-dynamic', '-Wl,-ldl', '-Wl,--end-group']) def test_string_templates_substitution(self): dictfunc = mesonbuild.mesonlib.get_filenames_templates_dict |