[llvm] r370655 - [llvm-dlltool] Remove support for implying output name
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 06:28:07 PDT 2019
Author: mstorsjo
Date: Mon Sep 2 06:28:07 2019
New Revision: 370655
URL: http://llvm.org/viewvc/llvm-project?rev=370655&view=rev
Log:
[llvm-dlltool] Remove support for implying output name
I don't see GNU dlltool supporting doing this; with only a -d option
and no -l option, GNU dlltool runs successfully but doesn't write any
output file.
Differential Revision: https://reviews.llvm.org/D65645
Modified:
llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
Modified: llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp?rev=370655&r1=370654&r2=370655&view=diff
==============================================================================
--- llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp (original)
+++ llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp Mon Sep 2 06:28:07 2019
@@ -74,13 +74,6 @@ static MachineTypes getEmulation(StringR
.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;
@@ -154,8 +147,6 @@ int llvm::dlltoolDriverMain(llvm::ArrayR
}
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) {
@@ -175,7 +166,8 @@ int llvm::dlltoolDriverMain(llvm::ArrayR
}
}
- if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
+ if (!Path.empty() &&
+ writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
return 1;
return 0;
}
More information about the llvm-commits
mailing list