Bug 1747757 - Remove -l from OS_LIBS set from gyp. r=firefox-build-system-reviewers,mhentges

NSS gyp files use -l$lib, and while OS_LIBS accepts this form and passes
it through, it's not actually a recognized way to link libraries on
clang-cl builds. So, re-normalize the values to not include -l, which
will add it back in the backend when appropriate, or switch to $lib.lib
on platforms that use this form.

Differential Revision: https://phabricator.services.mozilla.com/D134736
This commit is contained in:
Mike Hommey
2021-12-29 22:18:51 +00:00
parent e21c8075c2
commit 789534e4b7

View File

@@ -203,6 +203,10 @@ def process_gyp_result(
os_libs = []
for l in libs:
if l.startswith("-"):
if l.startswith("-l"):
# Remove "-l" for consumption in OS_LIBS. Other flags
# are passed through unchanged.
l = l[2:]
if l not in os_libs:
os_libs.append(l)
elif l.endswith(".lib"):