[PATCH] D65645: [llvm-dlltool] Remove support for implying output name
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 04:32:39 PDT 2019
mstorsjo created this revision.
mstorsjo added reviewers: ruiu, rnk, martell.
Herald added subscribers: dexonsmith, steven_wu, inglorion, mehdi_amini.
Herald added a project: LLVM.
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 output anything.
Repository:
rL LLVM
https://reviews.llvm.org/D65645
Files:
lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
Index: lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
===================================================================
--- lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
+++ lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
@@ -74,13 +74,6 @@
.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 @@
}
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) {
@@ -174,7 +165,8 @@
}
}
- if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
- return 1;
+ if (!Path.empty())
+ if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
+ return 1;
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65645.213016.patch
Type: text/x-patch
Size: 1124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190802/cd0fe24a/attachment.bin>
More information about the llvm-commits
mailing list