[HIP] Fix static lib name on windows
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Mon, 30 May 2022 19:21:14 +0000 (15:21 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Wed, 1 Jun 2022 02:13:50 +0000 (22:13 -0400)
commit377806a65ea97837c99d9791db9d462b63b9135a
treed16ab0429b48fd54d5b819ab62eaf91657614eb2
parenta2ea5b496bcd3762f96c38a09db1d38729fa6325
[HIP] Fix static lib name on windows

clang by default assumes static library name to be xxx.lib
when -lxxx is specified on Windows with MSVC environment,
instead of libxxx.a.

This patch fixes static device library unbundling for that.
It falls back to libxxx.a if xxx.lib is not found.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D126681
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/test/Driver/hip-link-bundle-archive.hip