diff options
author | Jack Lloyd <[email protected]> | 2021-04-18 09:01:45 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-04-18 09:01:45 -0400 |
commit | 39f92048f8c79959b54f0d5dd1fd7511612600dc (patch) | |
tree | bbbeff1dc59bf3a0a9d1752677920c1fbaffe1b9 | |
parent | 24552a874fa277df932f8e9de6dde264462ab8f4 (diff) | |
parent | 956ba3bf71578293db7b81bab629fde11b000827 (diff) |
Merge GH #2719 Fix linker flags #2715
-rwxr-xr-x | configure.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.py b/configure.py index 1cea37e16..89f87d470 100755 --- a/configure.py +++ b/configure.py @@ -3017,8 +3017,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 |