aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2021-04-17 09:50:41 -0400
committerJack Lloyd <[email protected]>2021-04-17 09:50:41 -0400
commit1c5043bdfaf94919626eb38019571bb6f26a91fd (patch)
tree78f851f8f5a3f8515e5450714924bbbe26b7fca2 /configure.py
parentaba463a8cb1de5b7175cbdf612eb0edbafc25996 (diff)
parent4db392ef15c6566c1d991b3d321e3421c74d3ae4 (diff)
Merge GH #2718 Fix detection of linker flags
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 6fc107438..5ec5af536 100755
--- a/configure.py
+++ b/configure.py
@@ -3042,8 +3042,14 @@ def canonicalize_options(options, info_os, info_arch):
options.fuzzer_lib = 'Fuzzer'
if options.ldflags is not None:
- libs = [m.group(1) for m in re.finditer(r'-l([a-z0-9]+)', options.ldflags)]
- options.extra_libs += ','.join(libs)
+ extra_libs = []
+ link_to_lib = re.compile('^-l(.*)')
+ for flag in options.ldflags.split(' '):
+ match = link_to_lib.match(flag)
+ if match:
+ extra_libs.append(match.group(1))
+
+ options.extra_libs += ','.join(extra_libs)
# Checks user options for consistency
# This method DOES NOT change options on behalf of the user but explains