summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Make Driver::link and LinkingContext::validate return true on success.Rui Ueyama2013-09-246-59/+53
| | | | | | | | | | | | | 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
* [PECOFF] Fix /? option and add a test for the flag.Rui Ueyama2013-09-241-1/+1
| | | | llvm-svn: 191320
* [PECOFF] Ignore /verbose and /wx (warnings as errors) options.Rui Ueyama2013-09-241-7/+16
| | | | llvm-svn: 191317
* [PECOFF] Add /swaprun:{cd,net} options.Rui Ueyama2013-09-242-0/+14
| | | | llvm-svn: 191276
* [PECOFF] Ignore /pdbaltpath option.Rui Ueyama2013-09-241-0/+1
| | | | | | | | /PDBALTPATH:<path> is an option to embed a different path for the PDB file to the binary than the actual PDB file location. Because we don't support PDB file, we'll just ignore the option for now. llvm-svn: 191273
* Expand auto to improve code readability.Rui Ueyama2013-09-241-1/+1
| | | | llvm-svn: 191272
* [PECOFF] Use macro for the repeating pattern of the Driver code.Rui Ueyama2013-09-242-42/+20
| | | | llvm-svn: 191271
* [PECOFF] Remove redundant comments.Rui Ueyama2013-09-241-23/+12
| | | | llvm-svn: 191270
* [PECOFF] Ignore /pdb option.Rui Ueyama2013-09-241-2/+2
| | | | llvm-svn: 191269
* [PECOFF] Ignore /debug option.Rui Ueyama2013-09-242-0/+8
| | | | llvm-svn: 191268
* [PECOFF] Add /nodefaultlib command line option.Rui Ueyama2013-09-242-7/+27
| | | | llvm-svn: 191254
* [PECOFF] Do not allow space to separate command line option and its value.Rui Ueyama2013-09-231-24/+19
| | | | | | | | | | | | | | | We used to support both Windows and Unix style command line options. In Windows style, an option and its value are separated by ":" (colon). In Unix, separator is a space. Accepting both styles were convenient, but we can no longer allow Unix style because I found that can be ambiguous. For example, /nodefaultlib option takes an optional argument. In Windows style it's going to be something like "/nodefaultlib:foo". There's no ambiguity what "foo" means. However, if the option is "/nodefaultlib foo", "foo" can be interpreted either an optional argument for "/nodefaultlib" or an input file "foo.obj". We should just stop accepting the non-standard command line style. llvm-svn: 191247
* [PECOFF] Ignore /delay and /delayload options.Rui Ueyama2013-09-231-0/+8
| | | | | | | | | | | | | | | | These options are to enable DLL delay loading. If enabled, DLL is loaded at run time by a helper routine when a function in the DLL is actually called for the first time, instead of making the Windows loader to load all DLLs at startup time. This should shorten startup delay if an executable have many imported symbols. The linker needs to create a "delayed import table" and link delayimp.lib in which helper functions are defined to support the feature. For now, we just ignore the options, so that the linker does not complain when it sees these options. We want to support them in the future. llvm-svn: 191232
* [PECOFF] Add /allowisolation command line option.Rui Ueyama2013-09-232-0/+11
| | | | llvm-svn: 191227
* [PECOFF] Add /allowbind command line option.Rui Ueyama2013-09-232-0/+11
| | | | llvm-svn: 191224
* [PECOFF] Simplify WinLinkOptions.td.Rui Ueyama2013-09-232-20/+17
| | | | llvm-svn: 191223
* [PECOFF] Add /align command line option.Rui Ueyama2013-09-232-0/+11
| | | | llvm-svn: 191218
* Whitespace and extra parentheses.Rui Ueyama2013-09-231-1/+1
| | | | llvm-svn: 191217
* [lld][LinkingContext][ELF] Allow different output file types.Shankar Easwaran2013-09-232-16/+28
| | | | | | | | | | This adds an option --output-filetype that can be set to either YAML/Native(case insensitive). The linker would create the outputs associated with the type specified by the user. Changes all the tests to use the new option. llvm-svn: 191183
* [lld][WinLink] Fix typoRon Ofir2013-09-201-2/+2
| | | | llvm-svn: 191079
* Fallback to the default stringize function to show some meaningful error ↵Rui Ueyama2013-09-201-8/+3
| | | | | | | | | | message. GNU LD driver only understood no_such_file_or_directory error and was showing just "Unknown Error" for any other type of error. With this patch, the driver now prints file name and error message string by default. llvm-svn: 191070
* [PECOFF] Ignore /incremental option.Rui Ueyama2013-09-201-0/+2
| | | | | | | | | /incremental is an option to enable incremental linking. We will eventually want to implement the feature for better performance, but in the meantime, we want to just ignore the option so that the linker does not output unknown option error when it sees /incremental option. llvm-svn: 191063
* Remove extraneous parentheses.Rui Ueyama2013-09-201-1/+1
| | | | llvm-svn: 191061
* [PECOFF] Ignore /errorReport command line option.Rui Ueyama2013-09-191-3/+8
| | | | | | | | /errorReport is a command line option to let the linker to report internal linker error information to Microsoft. For LLD that option doesn't make any sense, so it just ignores the option. llvm-svn: 191044
* [lld][ELF] Group command line options for better usageShankar Easwaran2013-09-191-97/+202
| | | | llvm-svn: 191033
* [PECOFF][Driver] Support /version command line optionRui Ueyama2013-09-192-9/+25
| | | | llvm-svn: 190986
* Output soname.Joerg Sonnenberger2013-09-141-0/+4
| | | | llvm-svn: 190758
* Revert "[PECOFF] Allocate storage for .drective in the reader ..."Rui Ueyama2013-09-131-4/+4
| | | | | | This reverts r189881 because that patch caused dangling StringRefs. llvm-svn: 190725
* [PECOFF] Add a field for machine type to PECOFFLinkingContext.Rui Ueyama2013-09-121-4/+14
| | | | | | | | | So that we can determine what the target architecture is. Adding this field does not mean that we are going to support non-i386 architectures soon; there are many things to do to support them, and I'm focusing on i386 now. But this is the first step toward multi architecture support. llvm-svn: 190627
* Remove hard-coded leading underscore from entry symbol.Rui Ueyama2013-09-121-3/+3
| | | | llvm-svn: 190586
* Allow darwin driver to use -help when no input files are specified.Nick Kledzik2013-09-101-10/+10
| | | | | | Patch by Joe Ranieri llvm-svn: 190453
* Support darwin linker options: Nick Kledzik2013-09-102-0/+65
| | | | | | | | -current_version, -compatibility_version, and -install_name. Patch by Joe Ranieri llvm-svn: 190452
* Use llvm::sys::Process::GetEnv() instead of ::getenv().Rui Ueyama2013-09-101-6/+9
| | | | | | | Process::GetEnv() uses GetEnvironmentVariableW, which is a Windows API to get an environment variable and is preferable over getenv(). llvm-svn: 190431
* Rename GnuLDInputGraph.h -> GnuLdInputGraph.h for consistency with other files.Rui Ueyama2013-09-091-1/+1
| | | | llvm-svn: 190332
* Use _isWholeArchive to silence -Wunused-private-field warning.Rui Ueyama2013-09-091-1/+1
| | | | llvm-svn: 190329
* Recognize -Bstatic as alias for -static, clang uses it.Joerg Sonnenberger2013-09-091-0/+1
| | | | llvm-svn: 190301
* Drop the context forceLoadAllArchives() support. Rename the isForceLoadJoerg Sonnenberger2013-09-083-10/+13
| | | | | | | | | 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
* Change the parseFile argument from MemoryBuffer pointer to LinkerInputJoerg Sonnenberger2013-09-076-30/+24
| | | | | | reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
* [PECOFF] Add /machine command line option.Rui Ueyama2013-09-062-0/+10
| | | | llvm-svn: 190121
* Remove extraneous parentheses.Rui Ueyama2013-09-061-2/+2
| | | | llvm-svn: 190119
* Return early to simplify.Rui Ueyama2013-09-061-13/+11
| | | | llvm-svn: 190117
* Remove unused identifiers.Rui Ueyama2013-09-054-9/+4
| | | | llvm-svn: 190095
* [PECOFF] Ignore options starting with -?Rui Ueyama2013-09-042-13/+18
| | | | | | | | | | | The compiler is allowed to add a linker option starting with -?<name> to .drectve section. If the linker can interpret -<name>, it's processed as if there's no question mark there. If not, such option is silently ignored. This is a COFF's feature to allow the compiler to emit new linker options while keeping compatibility with older linkers. llvm-svn: 189897
* Rename *Options.td -> <flavor>Options.td.Rui Ueyama2013-09-045-41/+39
| | | | | | | | | | | | | Before this patch, name of driver implementation is not consistent with its option table file. Specifically, LDOptions has a different prefix than GnuLdDriver. This patch renames option files, so that the option files have the same prefix as the corresponding driver files. Differential Revision: http://llvm-reviews.chandlerc.com/D1591 llvm-svn: 189895
* [lld][Driver] remove return after llvm_unreachableShankar Easwaran2013-09-041-1/+0
| | | | llvm-svn: 189891
* [lld][Driver] The driver was creating linker inputs twiceShankar Easwaran2013-09-031-1/+5
| | | | | | | Also add a llvm_unreachable call so that the linker will trip on unhandled inputElement types. llvm-svn: 189887
* Recognize -rpath-link option and add arguments to ELFLinkingContext.Joerg Sonnenberger2013-09-032-0/+9
| | | | llvm-svn: 189883
* [PECOFF] Allocate storage for .drective in the reader to avoid multiple ↵Rui Ueyama2013-09-031-4/+4
| | | | | | calls of allocateString() llvm-svn: 189881
* [PECOFF] Verify parameter in validateImpl() not in the driver.Rui Ueyama2013-09-031-7/+0
| | | | llvm-svn: 189877
* [lld] handle the case of errors from createLinkerInputShankar Easwaran2013-09-035-18/+43
| | | | | | | | | | This changes the interface of createLinkerInput to use ErrorOr, so that errors from the linker can be captured. Also adds a convenience function for error strings to be returned from file nodes. llvm-svn: 189871
OpenPOWER on IntegriCloud