This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Fix static lib name on windows
ClosedPublic

Authored by yaxunl on May 30 2022, 5:07 PM.

Details

Summary

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.

Diff Detail

Event Timeline

yaxunl created this revision.May 30 2022, 5:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2022, 5:07 PM
yaxunl requested review of this revision.May 30 2022, 5:07 PM
tra accepted this revision.May 31 2022, 10:11 AM
tra added inline comments.
This revision is now accepted and ready to land.May 31 2022, 10:11 AM
yaxunl marked an inline comment as done.May 31 2022, 2:51 PM
yaxunl added inline comments.
clang/lib/Driver/ToolChains/CommonArgs.cpp
1788

will fix when committing

This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2022, 7:14 PM