Bug 1480005 - Always use llvm-lib when targetting Windows. r=firefox-build-system-reviewers,dmajor

The linker is always lld-link, as we don't support MSVC anymore, so the
fallback to "lib" is never used.

Differential Revision: https://phabricator.services.mozilla.com/D101678
This commit is contained in:
Mike Hommey 2021-01-14 15:41:30 +00:00
Родитель 2d9f7dc611
Коммит a160c92089
1 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -2865,20 +2865,13 @@ def rc_names(c_compiler, toolchain_prefix):
check_prog("RC", rc_names, paths=toolchain_search_path, when=target_is_windows)
@depends(link, toolchain_prefix, c_compiler)
def ar_config(link, toolchain_prefix, c_compiler):
if c_compiler.type == "clang-cl" and link:
# if LINKER is set, it's either for lld-link or link
if "lld-link" in link:
return namespace(
names=("llvm-lib",),
flags=("-llvmlibthin", "-out:$@"),
)
else:
return namespace(
names=("lib",),
flags=("-NOLOGO", "-OUT:$@"),
)
@depends(toolchain_prefix, c_compiler)
def ar_config(toolchain_prefix, c_compiler):
if c_compiler.type == "clang-cl":
return namespace(
names=("llvm-lib",),
flags=("-llvmlibthin", "-out:$@"),
)
return namespace(
names=tuple("%s%s" % (p, "ar") for p in (toolchain_prefix or ()) + ("",)),
flags=("crs", "$@"),