aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-07-18 21:20:32 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2023-08-07 05:44:08 -0700
commit926c3a69195385bd5c16acd269f4dae5322e0c03 (patch)
tree38aecac74189f1243b597585dad8ef5200ff0a40 /unittests
parent9df16279971b48787c1db232c274054f173531df (diff)
downloadmeson-926c3a69195385bd5c16acd269f4dae5322e0c03.zip
meson-926c3a69195385bd5c16acd269f4dae5322e0c03.tar.gz
meson-926c3a69195385bd5c16acd269f4dae5322e0c03.tar.bz2
Error when an installed static library links to internal custom target
When an installed static library A links to an internal static library B built using a custom_target(), raise an error instead of a warning. This is because to be usable, A needs to contain B which would require to extract the archive to get its objects files. This used to work, but was printing a warning and was installing a broken static library, because we used to overlink in many cases, and that got fixed in Meson 1.2.0. It now fails at link time with symbols from the custom target not being defined. It's better to turn the warning into a hard error at configure time. While at it, noticed this situation can happen for any internal custom or rust target we link to, recursively. get_internal_static_libraries_recurse() could be called on CustomTarget objects which do not implement it, and even if we did not call that method, it would still fail when trying to call extract_all_objects() on it. Fixes: #12006
Diffstat (limited to 'unittests')
-rw-r--r--unittests/linuxliketests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py
index bd73857..2de4dbc 100644
--- a/unittests/linuxliketests.py
+++ b/unittests/linuxliketests.py
@@ -1863,3 +1863,6 @@ class LinuxlikeTests(BasePlatformTests):
self.assertIn('build t6-e1: c_LINKER t6-e1.p/main.c.o | libt6-s2.a libt6-s3.a\n', content)
self.assertIn('build t7-e1: c_LINKER t7-e1.p/main.c.o | libt7-s3.a\n', content)
self.assertIn('build t8-e1: c_LINKER t8-e1.p/main.c.o | libt8-s1.a libt8-s2.a libt8-s3.a\n', content)
+ self.assertIn('build t9-e1: c_LINKER t9-e1.p/main.c.o | libt9-s1.a libt9-s2.a libt9-s3.a\n', content)
+ self.assertIn('build t12-e1: c_LINKER t12-e1.p/main.c.o | libt12-s1.a libt12-s2.a libt12-s3.a\n', content)
+ self.assertIn('build t13-e1: c_LINKER t13-e1.p/main.c.o | libt12-s1.a libt13-s3.a\n', content)