Add support for MS Lib.

If the target OS is Windows using the MS runtime then use LIB.EXE as the archiver.
This commit is contained in:
kai
2012-09-16 00:03:27 +02:00
parent c5fcd255ff
commit 6e554c6647
4 changed files with 46 additions and 9 deletions

View File

@@ -18,6 +18,16 @@ static cl::opt<std::string> ar("ar",
cl::Hidden,
cl::ZeroOrMore);
static cl::opt<std::string> link("ms-link",
cl::desc("LINK to use for linking on Windows"),
cl::Hidden,
cl::ZeroOrMore);
static cl::opt<std::string> lib("ms-lib",
cl::desc("Library Manager to use on Windows"),
cl::Hidden,
cl::ZeroOrMore);
sys::Path getProgram(const char *name, const cl::opt<std::string> &opt, const char *envVar = 0)
{
const char *prog = NULL;
@@ -52,3 +62,13 @@ sys::Path getArchiver()
{
return getProgram("ar", ar);
}
sys::Path getLink()
{
return getProgram("link.exe", link);
}
sys::Path getLib()
{
return getProgram("lib.exe", lib);
}