mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
c7b3ee905f
Hook up the -k option (that in the original GNU dlltool removes the @n suffix from the symbol that the final executable ends up linked to). In llvm-dlltool, make sure that functions end up with the undecorate name type if this option is set and they are decorated. In mingw, when creating import libraries from def files instead of creating an import library as a side effect of linking a DLL, the symbol names in the def contain the stdcall/fastcall decoration (but no leading underscore). By setting the undecorate name type, a linker linking to the import library will omit the decoration from the DLL import entry. With this in place, mingw-w64 for i386 built with llvm-dlltool/clang produces import libraries that actually work. Differential Revision: https://reviews.llvm.org/D36548 llvm-svn: 310990
27 lines
1.1 KiB
TableGen
27 lines
1.1 KiB
TableGen
include "llvm/Option/OptParser.td"
|
|
|
|
def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target machine">;
|
|
def m_long : JoinedOrSeparate<["--"], "machine">, Alias<m>;
|
|
|
|
def l: JoinedOrSeparate<["-"], "l">, HelpText<"Generate an import lib">;
|
|
def l_long : JoinedOrSeparate<["--"], "output-lib">, Alias<l>;
|
|
|
|
def D: JoinedOrSeparate<["-"], "D">, HelpText<"Specify the input DLL Name">;
|
|
def D_long : JoinedOrSeparate<["--"], "dllname">, Alias<D>;
|
|
|
|
def d: JoinedOrSeparate<["-"], "d">, HelpText<"Input .def File">;
|
|
def d_long : JoinedOrSeparate<["--"], "input-def">, Alias<d>;
|
|
|
|
def k: Flag<["-"], "k">, HelpText<"Kill @n Symbol from export">;
|
|
def k_alias: Flag<["--"], "kill-at">, Alias<k>;
|
|
|
|
//==============================================================================
|
|
// The flags below do nothing. They are defined only for dlltool compatibility.
|
|
//==============================================================================
|
|
|
|
def S: JoinedOrSeparate<["-"], "S">, HelpText<"Assembler">;
|
|
def S_alias: JoinedOrSeparate<["--"], "as">, Alias<S>;
|
|
|
|
def f: JoinedOrSeparate<["-"], "f">, HelpText<"Assembler Flags">;
|
|
def f_alias: JoinedOrSeparate<["--"], "as-flags">, Alias<f>;
|