From 46f3cff5b26230900473efcd743763daa7c90453 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 26 Feb 2024 18:54:47 -0500 Subject: [PATCH] compilers: avoid catching -Wl,-soname and wrapping with start/end group This is just a bad regex match, because it matches *.so as a prospective filename input even though it is actually not an input but a linker flag. --start-group is only relevant to input files... --- mesonbuild/compilers/mixins/clike.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 76c8e0413..0c840a4f6 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -44,7 +44,7 @@ else: # do). This gives up DRYer type checking, with no runtime impact Compiler = object -GROUP_FLAGS = re.compile(r'''\.so (?:\.[0-9]+)? (?:\.[0-9]+)? (?:\.[0-9]+)?$ | +GROUP_FLAGS = re.compile(r'''^(?!-Wl,) .*\.so (?:\.[0-9]+)? (?:\.[0-9]+)? (?:\.[0-9]+)?$ | ^(?:-Wl,)?-l | \.a$''', re.X)