summaryrefslogtreecommitdiffstats
path: root/lld/unittests/DriverTests/DarwinLdDriverTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Darwin] Use errorHandler from liblldCommonBrian Gesiak2018-06-121-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Error handling in liblldCore and the Darwin toolchain prints to an output stream. A TODO in the project explained that a diagnostics interface resembling Clang's should be added. For now, the simple diagnostics interface defined in liblldCommon seems like an improvement. It prints colors when they're available, uses locks for thread-safety, and abstracts away the `"error: "` and newline literal strings that litter the Darwin toolchain code. To use the liblldCommon error handler, a link dependency is added to the liblldDriver library. Test Plan: 1. check-lld 2. Invoke `ld64.lld -r` in a terminal that supports color output. Confirm that "ld64.lld: error: -arch not specified and could not be inferred" is output, and that the "error:" is colored red! Reviewers: ruiu, smeenai Reviewed By: ruiu Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D47998 llvm-svn: 334466
* Remove \brief commands from doxygen comments.Fangrui Song2018-05-151-1/+1
| | | | | | | | | | | | Summary: This is similar to D46290 D46320. Reviewers: ruiu, grimar Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D46861 llvm-svn: 332372
* Move new lld's code to Common subdirectory.Rui Ueyama2017-10-021-1/+1
| | | | | | | | | | New lld's files are spread under lib subdirectory, and it isn't easy to find which files are actually maintained. This patch moves maintained files to Common subdirectory. Differential Revision: https://reviews.llvm.org/D37645 llvm-svn: 314719
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-1/+1
| | | | | | | | | | | | 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
* Merge DarwinLdDriver and Driver.Rui Ueyama2016-03-021-1/+8
| | | | | | | | | | | Now that DarwinLdDriver is the only derived class of Driver. This patch merges them and actually removed the class because they can now just be non-member functions. This change simplifies a common header, Driver.h. http://reviews.llvm.org/D17788 llvm-svn: 262502
* Remove DriverTest.h.Rui Ueyama2016-02-281-63/+67
| | | | | | | | Because the class is used only by one instance, we do not have to use template there in DriverTest.h. Everything can be moved to DarwinLdDriverTest.cpp. llvm-svn: 262192
* Move functionality of UniversalDriver to the entry point file.Rui Ueyama2016-02-281-9/+0
| | | | | | | | | | | | | | UniversalDriver was used as a dispatcher to each platform-specific driver. It had its own Options.td file. It was not just too much to parse only a few options (we only want to parse -core, -flavor or argv[0]), but also interpreted arguments too early. For example, if you invoke lld as "lld -flavor gnu ... -help", then you'd get the UniversalDriver's help message instead of GnuDriver's. This patch eliminates the use of Options from the dispatcher. http://reviews.llvm.org/D17686 llvm-svn: 262190
* Add support for export_dynamic cmdline option and behaviour.Pete Cooper2016-01-221-0/+25
| | | | | | | | | | | This option matches the behaviour of ld64, that is it prevents globals from being dead stripped in executables and dylibs. Reviewed by Lang Hames Differential Revision: http://reviews.llvm.org/D16026 llvm-svn: 258554
* Fix DarwinLdDriverTest.cpp to pass real llvm options.Pete Cooper2015-12-161-3/+3
| | | | | | | | | | | After r255819, parse() actually parses what you pass it. This test was failing because it passed '--debug-only' which isn't in release builds, but also 'foo' which isn't an option at all. We now pass -enable-tbaa and -enable-misched which are real options. llvm-svn: 255822
* Unittest: Do s/_context/_ctx/g.Rui Ueyama2015-02-101-51/+51
| | | | llvm-svn: 228750
* Sort include files according to convention.Shankar Easwaran2014-10-181-3/+1
| | | | llvm-svn: 220131
* [mach-o] Let darwin driver infer arch from .o files if -arch not used.Nick Kledzik2014-09-041-30/+40
| | | | | | | | | | | | | | | | Mach-O has a "fat" (or "universal") variant where the same contents built for different architectures are concatenated into one file with a table-of-contents header at the start. But this leaves a dilemma for the linker - which architecture to use. Normally, the linker command line -arch is used to force which slice of any fat files are used. The clang compiler always passes -arch to the linker when invoking it. But some Makefiles invoke the linker directly and don’t specify the -arch option. For those cases, the linker scans all input files in command line order and finds the first non-fat object file. Whatever architecture it is becomes the architecture for the link. llvm-svn: 217189
* [mach-o] Fix initial live atoms with -dead_stripNick Kledzik2014-08-211-3/+4
| | | | | | | When -dead_strip is used with -exported_symbols_list the initial set of live atoms are those in the export list. llvm-svn: 216213
* MachO: rename _outputFileType to avoid shadowing parent field.Tim Northover2014-06-201-5/+5
| | | | llvm-svn: 211367
* Make anonymous namespace as small as possible.Rui Ueyama2014-03-271-4/+1
| | | | llvm-svn: 204982
* Add "override" and remove "virtual" where appropriate.Rui Ueyama2014-03-061-1/+1
| | | | | | | For the record, I used clang-modernize to add "override" and perl to remove "virtual". llvm-svn: 203164
* [mach-o] Add support for -mllvm to darwin driverNick Kledzik2013-09-281-0/+9
| | | | llvm-svn: 191594
* [mach-o] switch to use llvm::MachO:: constantsNick Kledzik2013-09-271-16/+17
| | | | | | Stop using some locally defined mach-o constants. llvm-svn: 191581
* Make Driver::link and LinkingContext::validate return true on success.Rui Ueyama2013-09-241-35/+35
| | | | | | | | | | | | | This patch inverts the return value of these functions, so that they return "true" on success and "false" on failure. The meaning of boolean return value was mixed in LLD; for example, InputGraph::validate() returns true on success. With this patch they'll become consistent. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1748 llvm-svn: 191341
* Support darwin linker options: Nick Kledzik2013-09-101-0/+52
| | | | | | | | -current_version, -compatibility_version, and -install_name. Patch by Joe Ranieri llvm-svn: 190452
* Drop the context forceLoadAllArchives() support. Rename the isForceLoadJoerg Sonnenberger2013-09-081-10/+0
| | | | | | | | | attribute in LinkerInput to isWholeArchive and use that for deciding whether library archives should be expanded. Implement the -all_load option of the Darwin linker using this flag and drop the support for it in GNU mode. llvm-svn: 190275
* add InputGraph functionalityShankar Easwaran2013-08-211-1/+1
| | | | llvm-svn: 188958
* Rename TargetInfo -> LinkingContext.Rui Ueyama2013-08-061-55/+52
| | | | | | | | | Also change some local variable names: "ti" -> "context" and "_targetInfo" -> "_context". Differential Revision: http://llvm-reviews.chandlerc.com/D1301 llvm-svn: 187823
* Check the return value from parse()Nick Kledzik2013-07-181-15/+15
| | | | llvm-svn: 186630
* Add support for -all_load. Enhance DarwinLdDriverTest unit test test cases ↵Nick Kledzik2013-07-181-0/+99
| | | | | | to test all options parsed so far llvm-svn: 186626
* Fix Driver tests to check return value of parse(), simplify subclassing, and ↵Nick Kledzik2013-07-161-29/+26
| | | | | | remove unneeded instance variables llvm-svn: 186440
* [Darwin][Driver] Add unit tests.Rui Ueyama2013-06-111-0/+89
llvm-svn: 183806
OpenPOWER on IntegriCloud