summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-09-02 13:28:07 +0000
committerMartin Storsjo <martin@martin.st>2019-09-02 13:28:07 +0000
commit40782261aea89dc55cd5688626a24bba116b9f17 (patch)
treeb01767ab45edfecb9982aedd53868a74ffa7cf86
parenta66fc1c99f3ebbd8f9fb52c01a1701570624a1b2 (diff)
downloadbcm5719-llvm-40782261aea89dc55cd5688626a24bba116b9f17.tar.gz
bcm5719-llvm-40782261aea89dc55cd5688626a24bba116b9f17.zip
[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 llvm-svn: 370655
-rw-r--r--llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp b/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
index 3b8b25d7eca..bd026a09e0c 100644
--- a/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
+++ b/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
@@ -74,13 +74,6 @@ static MachineTypes getEmulation(StringRef S) {
.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::ArrayRef<const char *> ArgsArr) {
}
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::ArrayRef<const char *> ArgsArr) {
}
}
- if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
+ if (!Path.empty() &&
+ writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
return 1;
return 0;
}
OpenPOWER on IntegriCloud