.Default(IMAGE_FILE_MACHINE_UNKNOWN);
}
-static std::string getImplibPath(StringRef Path) {
- SmallString<128> Out = StringRef("lib");
- Out.append(Path);
- sys::path::replace_extension(Out, ".a");
- return Out.str();
-}
-
int llvm::dlltoolDriverMain(llvm::ArrayRef<const char *> ArgsArr) {
DllOptTable Table;
unsigned MissingIndex;
}
std::string Path = Args.getLastArgValue(OPT_l);
- if (Path.empty())
- Path = getImplibPath(Def->OutputFile);
if (Machine == IMAGE_FILE_MACHINE_I386 && Args.getLastArg(OPT_k)) {
for (COFFShortExport& E : Def->Exports) {
}
}
- if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
+ if (!Path.empty() &&
+ writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
return 1;
return 0;
}