summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/WinLinkDriver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Change the parseFile argument from MemoryBuffer pointer to LinkerInputJoerg Sonnenberger2013-09-071-10/+0
| | | | | | reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
* [PECOFF] Add /machine command line option.Rui Ueyama2013-09-061-0/+9
| | | | 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-051-2/+1
| | | | llvm-svn: 190095
* [PECOFF] Ignore options starting with -?Rui Ueyama2013-09-041-10/+15
| | | | | | | | | | | 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
* [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-031-7/+7
| | | | | | | | | | 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
* Cosmetic changesRui Ueyama2013-09-031-5/+8
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1577 llvm-svn: 189777
* [lld][LinkingContext] Atoms created from command line options should be ↵Shankar Easwaran2013-08-311-0/+5
| | | | | | | | | | | | available in YAML This adds an API to the LinkingContext for flavors to add Internal files containing atoms that need to appear in the YAML output as well, when -emit-yaml switch is used. Flavors can add more internal files for other options that are needed. llvm-svn: 189718
* [PECOFF] Add /force:unresolved command line option as a synonym of /force.Rui Ueyama2013-08-291-1/+3
| | | | llvm-svn: 189614
* [PECOFF] Make command line options case insensitive to match link.exe's ↵Rui Ueyama2013-08-281-1/+5
| | | | | | behavior. llvm-svn: 189505
* [PECOFF] Add the entry symbol and /include symbols to dead strip root set.Rui Ueyama2013-08-271-0/+9
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1527 llvm-svn: 189318
* Fix use of temporary strings.Rui Ueyama2013-08-271-4/+4
| | | | llvm-svn: 189310
* [PECOFF] Enable dead-stripping by default to match link.exe behavior.Rui Ueyama2013-08-271-0/+11
| | | | llvm-svn: 189308
* Treat entry point symbol as an undefined atom.Rui Ueyama2013-08-271-1/+1
| | | | | | | | | With this patch the entry symbol is treated as an undefined symbol, to force the resolver to resolve the entry symbol. Differential Revision: http://llvm-reviews.chandlerc.com/D1524 llvm-svn: 189307
* [PECOFF] Add Support for entry point symbol nameRui Ueyama2013-08-261-0/+19
| | | | | | Patch by Jesús Serrano García. llvm-svn: 189267
* [PECOFF] support additional subsystem identifiersSaleem Abdulrasool2013-08-241-0/+10
| | | | | | | | | This completes the subsystem name parsing to support the identifiers that the Microsoft link.exe linker supports. "windows" and "console" are left as the first items as they are the expected common paths. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 189181
* Separates /fixed (no .reloc section) and /dynamicbase (enable ASLR)Rui Ueyama2013-08-241-0/+13
| | | | | | | | in order to match link.exe's behaviour. Patch by Ron Ofir. llvm-svn: 189159
* Fixes an additional temporary string use.Rui Ueyama2013-08-231-1/+1
| | | | | | Patch by Ron Ofir. llvm-svn: 189151
* [lld][PECOFF] Fix one more reference to a temporary stringShankar Easwaran2013-08-221-1/+1
| | | | llvm-svn: 189035
* [lld][PECOFF] Fix use of temporary stringsShankar Easwaran2013-08-221-1/+1
| | | | llvm-svn: 189025
* add InputGraph functionalityShankar Easwaran2013-08-211-251/+212
| | | | llvm-svn: 188958
* [PECOFF] Handle "--" option explicitlyHans Wennborg2013-08-131-0/+8
| | | | | | | | | This used to be handled automagically by the option parsing library, but after LLVM r188314, we should handle it ourselves. No functionality change, but adds a test. llvm-svn: 188318
* Rename TargetInfo -> LinkingContext.Rui Ueyama2013-08-061-53/+56
| | | | | | | | | Also change some local variable names: "ti" -> "context" and "_targetInfo" -> "_context". Differential Revision: http://llvm-reviews.chandlerc.com/D1301 llvm-svn: 187823
* [PECOFF] Remove special treatment of "--" option.Rui Ueyama2013-08-021-20/+1
| | | | | | | Thanks to Hans' patch (r187675), OptTable now handles "--", so we don't need this code in LLD. llvm-svn: 187683
* Remove the SUPPORT_ALIASARGS defineHans Wennborg2013-08-011-2/+0
| | | | | | It is not needed after LLVM r187546. llvm-svn: 187551
* Option parsing tables: pick up AliasArgs from the OPTION macro.Hans Wennborg2013-07-311-3/+6
| | | | | | | | | This depends on LLVM r187537. The SUPPORT_ALIASARGS macro will be removed once all option parsing clients have been updated. llvm-svn: 187541
* Revert "[PECOFF][Driver] Remove quotes from command line arguments."Rui Ueyama2013-07-311-21/+12
| | | | | | | | | | | | | | | This reverts commit r187390 because we should not handle argv's quotes ourselves. In Windows, unlike Unix, quotes are not processed by the shell. Instead the C startup routine parses it as described in http://msdn.microsoft.com/en-us/library/a1y7w461.aspx and pass the results to main(). So, at the time when the control reaches main(), quotes that should be removed has already been removed. We still need to handle quotes in the response file and in .drectve section ourselves. That will be addressed in different patches. llvm-svn: 187534
* [PECOFF][Driver] Remove quotes from command line arguments.Rui Ueyama2013-07-291-12/+21
| | | | | | | The command line option in .drectve section may be quoted by double quotes, and if that's the case we have to remove them. llvm-svn: 187390
* [PECOFF][Driver] Add ".lib" extension to the path given with /defaultlib.Rui Ueyama2013-07-261-1/+10
| | | | llvm-svn: 187259
* [PECOFF][Driver] Split WinLinkDriver::parse for readability.Rui Ueyama2013-07-251-19/+32
| | | | llvm-svn: 187161
* [PECOFF][Driver] Allow multiple /include options.Rui Ueyama2013-07-251-2/+5
| | | | llvm-svn: 187100
* [PECOFF] Add /failifmismatch option.Rui Ueyama2013-07-251-0/+38
| | | | llvm-svn: 187095
* [PECOFF] Use Windows style options instead of Unix style as primary options.Rui Ueyama2013-07-241-22/+22
| | | | | | | LLD still accepts both Unix and Windows style options when it's run as link.exe. This patch does not change functionality. llvm-svn: 187086
* [PECOFF] Add /include command line option.Rui Ueyama2013-07-241-0/+4
| | | | | | | | | | The /include command line option is equivalent to Unix --undefined option, which forces the linker to resolve the given symbol name as if it's an unresolved symbol in one of its input files. This feature is used to link an additional object file or a shared library that no input files refer to. llvm-svn: 187084
* [PECOFF] Support -tsaware:no command line option.Rui Ueyama2013-07-231-0/+4
| | | | llvm-svn: 186957
* [PECOFF] Support -fixed command line option to disable base relocations.Rui Ueyama2013-07-231-4/+8
| | | | llvm-svn: 186911
* [PECOFF][Driver] Add -base command line option.Rui Ueyama2013-07-201-4/+29
| | | | llvm-svn: 186739
* [PECOFF][Driver] Process "LINK" environment variable.Rui Ueyama2013-07-191-5/+37
| | | | llvm-svn: 186654
* [PECOFF][Driver] Add -defaultlib command line option.Rui Ueyama2013-07-191-1/+16
| | | | llvm-svn: 186650
* [PECOFF][Driver] Interpret "LIB" environment variable.Rui Ueyama2013-07-191-0/+20
| | | | llvm-svn: 186648
* [PECOFF] Use library search path when looking for a .lib file.Rui Ueyama2013-07-191-10/+3
| | | | llvm-svn: 186645
* [PECOFF][Driver] Add -libpath command line option.Rui Ueyama2013-07-191-0/+7
| | | | | | | The logic to search a library from the library paths will be implemented in a different patch. llvm-svn: 186644
* [PECOFF] Use replace_extension() instead of doing it myself.Rui Ueyama2013-07-181-5/+5
| | | | llvm-svn: 186612
* [WinLink] Add /LargeAddressAware command line option.Rui Ueyama2013-07-161-0/+4
| | | | llvm-svn: 186428
* Revert "Don't pass llvm::errs() all over the place. Diagnostics always go to ↵Rafael Espindola2013-07-151-13/+14
| | | | | | | | stderr." This reverts commit 185657. It will be used by unit tests. llvm-svn: 186366
* Don't pass llvm::errs() all over the place. Diagnostics always go to stderr.Rafael Espindola2013-07-041-14/+13
| | | | llvm-svn: 185657
OpenPOWER on IntegriCloud