[PATCH] D29892: ar: Add new driver to support dlltool

Martell Malone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 10:57:59 PDT 2017


martell updated this revision to Diff 93157.
martell edited the summary of this revision.
martell added a reviewer: pcc.
martell added subscribers: llvm-commits, compnerd, ruiu.
martell added a comment.

Updated as per some suggestions from rui:

- Now uses a single function called createImportLibrary from within COFFImportFile.

Originally suggested as `std::vector<uint8_t> createImportLibrary(std::vector<ExportSymbol>)`

The writeArchive function is needed to create this so it is a to file allocation.
Also 2 pieces of information need to be passed in.

  The MachineType i.e x86, x64, arm, etc
  The DllName i.e we need the internal name of the dll the functions expect to be found in.

So I had to adjust to

`std::error_code llvm::object::createImportLibrary(StringRef DllName, std::string &Path, std::vector<COFFShortExport> Exports, MachineTypes Machine)`

- added pcc as a reviewer.
- added ruiu as a subscriber in case any more feedback is needed on the above.
- added compnerd as he asked me to keep him up to date with this.
- added a simple testcase.
- put on llvm-commits and made public for review


Repository:
  rL LLVM

https://reviews.llvm.org/D29892

Files:
  include/llvm/DllDriver/DllDriver.h
  include/llvm/Object/COFFImportFile.h
  lib/CMakeLists.txt
  lib/DllDriver/CMakeLists.txt
  lib/DllDriver/Config.h
  lib/DllDriver/DllDriver.cpp
  lib/DllDriver/LLVMBuild.txt
  lib/DllDriver/ModuleDef.cpp
  lib/DllDriver/Options.td
  lib/Object/ArchiveWriter.cpp
  lib/Object/CMakeLists.txt
  lib/Object/COFFImportFile.cpp
  test/DllTool/coff-exports.def
  test/DllTool/lit.local.cfg
  tools/llvm-ar/CMakeLists.txt
  tools/llvm-ar/llvm-ar.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29892.93157.patch
Type: text/x-patch
Size: 42197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170327/c74b419d/attachment-0001.bin>


More information about the llvm-commits mailing list