summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ToolDrivers
Commit message (Collapse)AuthorAgeFilesLines
* Give llvm-lib rudimentary help output.Nico Weber2018-07-142-1/+11
| | | | | | https://reviews.llvm.org/D49318 llvm-svn: 337084
* [COFF] Improve correctness of def parsing for GNU featuresMartin Storsjo2018-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The operator == used for exporting a function with a different name in the DLL compared to the name in the import library (which is useful for adding linker level aliases for function in the import library) is a feature distinct and different from the operator = used for exporting a function with a different name (both in import library and DLL) than in the implementation producing the DLL. When creating an import library using dlltool, from a def file that contains forwards (Func = OtherDll.Func), this shouldn't affect the produced import library, which should still behave just as if it was a normal exported function. This clears a lot of confusion and subtle misunderstandings, and avoids a parameter that was used to avoid creating weak aliases when invoked from lld. (This parameter was added previously due to the existing conflation of the two features.) Differential Revision: https://reviews.llvm.org/D46245 llvm-svn: 331859
* [COFF] Keep the underscore on exported decorated stdcall functions in MSVC modeMartin Storsjo2018-01-201-1/+1
| | | | | | | | | This (together with the corresponding LLD commit, that contains the testcase updates) fixes PR35733. Differential Revision: https://reviews.llvm.org/D41631 llvm-svn: 323035
* Remove redundant includes from various places.Michael Zolotukhin2017-12-131-2/+0
| | | | llvm-svn: 320629
* [COFF] Improve the check for functions that should get an extra underscoreMartin Storsjo2017-10-231-2/+3
| | | | | | | | | | | This fixes exporting functions starting with an underscore, and fully decorated fastcall/vectorcall functions. Tests will be added in the lld repo. Differential Revision: https://reviews.llvm.org/D39168 llvm-svn: 316316
* Convert the archive writer to use Error.Rafael Espindola2017-09-211-7/+7
| | | | | | This found one place in lld that was not checking the error. llvm-svn: 313937
* [llvm-dlltool] Mention arm64 in the lists of architecture alternativesMartin Storsjo2017-09-081-2/+2
| | | | | | | | This was missed in SVN r310223 when arm64 support was added. Differential Revision: https://reviews.llvm.org/D37588 llvm-svn: 312776
* Removes redundant `llvm::`, add comments and simplify a return type of a ↵Rui Ueyama2017-09-061-29/+32
| | | | | | | | function. No functional change intended. llvm-svn: 312673
* Simplify writeArchive return type.Rui Ueyama2017-08-301-6/+5
| | | | | | | | | | writeArchive returned a pair, but the first element of the pair is always its first argument on failure, so it doesn't make sense to return it from the function. This patch change the return type so that it does't return it. Differential Revision: https://reviews.llvm.org/D37313 llvm-svn: 312177
* NFC: fix ToolDrivers syntax and typo errorsMartell Malone2017-08-232-7/+7
| | | | | | | infoTable -> InfoTable camelCase Libtool Options #define offset llvm-svn: 311517
* [dlltool] Make memory buffer ownership less weird.Benjamin Kramer2017-08-201-10/+6
| | | | | | There's no reason to destroy them in a global destructor. llvm-svn: 311287
* [llvm-dlltool] Improve an error message when unable to open files. NFC.Martin Storsjo2017-08-171-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D36818 llvm-svn: 311069
* [llvm-dlltool] Don't crash if no def file is provided or it can't be openedMartin Storsjo2017-08-171-7/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D36780 llvm-svn: 311068
* [COFF] Make the weak aliases optionalMartin Storsjo2017-08-161-1/+1
| | | | | | | | | | | | | | | | When creating an import library from lld, the cases with Name != ExtName shouldn't end up as a weak alias, but as a real export of the new name, which is what actually is exported from the DLL. This restores the behaviour of renamed exports to what it was in 4.0. The other half of this commit, including test, goes into lld. Differential Revision: https://reviews.llvm.org/D36633 llvm-svn: 310991
* [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386Martin Storsjo2017-08-162-3/+19
| | | | | | | | | | | | | | | | | | | | | 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
* [llvm-dlltool] Map the "arm64" machine typeMartin Storsjo2017-08-061-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D36365 llvm-svn: 310223
* llvm: add llvm-dlltool support to the archiverMartell Malone2017-07-186-1/+219
| | | | | | | | | | | | | | | | 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 This reapplies rL308329, which was reverted in rL308374 llvm-svn: 308379
* Revert r308329: llvm: add llvm-dlltool support to the archiverRui Ueyama2017-07-186-219/+1
| | | | | | This reverts commit r308329 because it broke buildbots. llvm-svn: 308374
* llvm: add llvm-dlltool support to the archiverMartell Malone2017-07-186-1/+219
| | | | | | | | | | | | | | | 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 llvm-svn: 308329
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-6/+4
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* Add dependency from LibDriver to BinaryFormat.Zachary Turner2017-06-071-1/+1
| | | | llvm-svn: 304867
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-5/+5
| | | | | | | | | | | | This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* Add missing filesPeter Collingbourne2017-05-132-0/+25
| | | | llvm-svn: 302996
* Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.Peter Collingbourne2017-05-134-0/+226
This reorganisation prevents us from cluttering up the top-level lib directory with more driver libraries such as llvm-dlltool (see D29892). llvm-svn: 302995
OpenPOWER on IntegriCloud