diff options
author | Martell Malone <martellmalone@gmail.com> | 2017-07-18 17:39:11 +0000 |
---|---|---|
committer | Martell Malone <martellmalone@gmail.com> | 2017-07-18 17:39:11 +0000 |
commit | 5d7d0e869f7abea7d1022e4b65a75a97dc2e54a6 (patch) | |
tree | b7a3a6df505a34ab7c1f86856276f97b93cf6345 /include | |
parent | 5472b31175f7207d42d1f0a45635b7b9ebe12c97 (diff) |
llvm: add llvm-dlltool support to the archiver
A PE COFF spec compliant import library generator.
Intended to be used with mingw-w64.
Supports:
PE COFF spec (section 8, Import Library Format)
PE COFF spec (Aux Format 3: Weak Externals)
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D29892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/COFFModuleDefinition.h | 7 | ||||
-rw-r--r-- | include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h | 24 |
2 files changed, 29 insertions, 2 deletions
diff --git a/include/llvm/Object/COFFModuleDefinition.h b/include/llvm/Object/COFFModuleDefinition.h index a0e8eacdb7a3..17491b81d5ba 100644 --- a/include/llvm/Object/COFFModuleDefinition.h +++ b/include/llvm/Object/COFFModuleDefinition.h @@ -16,7 +16,6 @@ // //===----------------------------------------------------------------------===// - #ifndef LLVM_OBJECT_COFF_MODULE_DEFINITION_H #define LLVM_OBJECT_COFF_MODULE_DEFINITION_H @@ -40,8 +39,12 @@ struct COFFModuleDefinition { uint32_t MinorOSVersion = 0; }; +// mingw and wine def files do not mangle _ for x86 which +// is a consequence of legacy binutils' dlltool functionality. +// This MingwDef flag should be removed once mingw stops this pratice. Expected<COFFModuleDefinition> -parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine); +parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine, + bool MingwDef = false); } // End namespace object. } // End namespace llvm. diff --git a/include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h b/include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h new file mode 100644 index 000000000000..964b0f7620a2 --- /dev/null +++ b/include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h @@ -0,0 +1,24 @@ +//===- DlltoolDriver.h - dlltool.exe-compatible driver ----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Defines an interface to a dlltool.exe-compatible driver. +// Used by llvm-dlltool. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TOOLDRIVERS_LLVM_DLLTOOL_DLLTOOLDRIVER_H +#define LLVM_TOOLDRIVERS_LLVM_DLLTOOL_DLLTOOLDRIVER_H + +namespace llvm { +template <typename T> class ArrayRef; + +int dlltoolDriverMain(ArrayRef<const char *> ArgsArr); +} // namespace llvm + +#endif |