Commit Graph

289 Commits

Author SHA1 Message Date
Rui Ueyama 3adc09e9fc Revert "[PECOFF][Driver] Remove quotes from command line arguments."
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
2013-07-31 22:13:15 +00:00
Rui Ueyama 85cd10ffa0 [PECOFF][Driver] Remove quotes from command line arguments.
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
2013-07-29 23:32:22 +00:00
Rui Ueyama 28084dc6cd [PECOFF][Driver] Add ".lib" extension to the path given with /defaultlib.
llvm-svn: 187259
2013-07-26 22:22:26 +00:00
Rui Ueyama 3e0bbb4b02 [PECOFF][Driver] Add a library file even if it does not exist.
Missing files will be reported as errors in the later pass, so this patch
does not change the behavior of the LLD linker, but it helps writing unit
tests for the driver.

llvm-svn: 187256
2013-07-26 22:17:08 +00:00
Rui Ueyama 9dcbf8b3f6 [PECOFF][Driver] Fix a bug that -mllvm does not take any arguments.
llvm-svn: 187243
2013-07-26 20:54:36 +00:00
Rui Ueyama f84d3d6187 Remove trailing whitespace.
llvm-svn: 187216
2013-07-26 17:08:12 +00:00
Rui Ueyama dc6983ca13 [PECOFF][Driver] Add /nologo command line option.
llvm-svn: 187162
2013-07-25 22:46:49 +00:00
Rui Ueyama 1e3e8752a8 [PECOFF] Add /failifmismatch option.
llvm-svn: 187095
2013-07-25 01:23:50 +00:00
Rui Ueyama d1d116aa89 [PECOFF] Use Windows style options instead of Unix style as primary options.
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
2013-07-24 23:18:02 +00:00
Rui Ueyama fd50283c3c [PECOFF] Add /include command line option.
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
2013-07-24 22:53:23 +00:00
Rui Ueyama a59c5ac16f Avoid using C-style cast and remove unnecessary LL prefix.
llvm-svn: 186960
2013-07-23 17:25:25 +00:00
Rui Ueyama fbf5763708 [PECOFF] Support -tsaware:no command line option.
llvm-svn: 186957
2013-07-23 17:17:19 +00:00
Rui Ueyama 6a41fca856 [PECOFF] Support -fixed command line option to disable base relocations.
llvm-svn: 186911
2013-07-23 01:29:50 +00:00
Rui Ueyama 5443cba6d9 Fix -Wsign-compare warnings.
llvm-svn: 186884
2013-07-22 22:21:39 +00:00
Rui Ueyama 6c655f237e [PECOFF][Driver] Show error message if no input file is given.
llvm-svn: 186882
2013-07-22 22:17:24 +00:00
Rui Ueyama 8e6c8f850d [PECOFF][Driver] Add -base command line option.
llvm-svn: 186739
2013-07-20 00:45:00 +00:00
Rui Ueyama 9f24922bd1 [PECOFF][Driver] Add -libpath command line option.
The logic to search a library from the library paths will be implemented
in a different patch.

llvm-svn: 186644
2013-07-19 01:38:49 +00:00
Nick Kledzik a20a403c1d Check the return value from parse()
llvm-svn: 186630
2013-07-18 23:47:22 +00:00
Nick Kledzik a121053471 Add support for -all_load. Enhance DarwinLdDriverTest unit test test cases to test all options parsed so far
llvm-svn: 186626
2013-07-18 23:13:13 +00:00
Rafael Espindola c97d83dd3b Fix the build with clang and libstdc++4.7.
llvm-svn: 186451
2013-07-16 20:18:13 +00:00
Nick Kledzik 2a709eaa83 Fix Driver tests to check return value of parse(), simplify subclassing, and remove unneeded instance variables
llvm-svn: 186440
2013-07-16 18:45:57 +00:00
Rui Ueyama b0b1d590ab [WinLink] Add /LargeAddressAware command line option.
llvm-svn: 186428
2013-07-16 17:20:38 +00:00
Rui Ueyama cb1c8cce46 Fix broken unittest for GnuLDDriver.
llvm-svn: 186427
2013-07-16 17:17:01 +00:00
Rui Ueyama 4a4079e839 [WinLink] Support /nxcompat command line option.
llvm-svn: 184050
2013-06-16 03:07:08 +00:00
Rui Ueyama 9f56df8e43 [Darwin][Driver] Add unit tests.
llvm-svn: 183806
2013-06-11 23:07:43 +00:00
Rui Ueyama daadcc59ad [WinLink] Add -force command line option to allow undefined symbols.
llvm-svn: 183724
2013-06-11 04:52:14 +00:00
Rui Ueyama 9dd08d912d [PECOFF][Driver] Add -heap command line option.
llvm-svn: 183622
2013-06-08 22:59:10 +00:00
Rui Ueyama eb0cc96e4b [PECOFF][Driver] Add -stack command line option.
llvm-svn: 183604
2013-06-08 03:59:00 +00:00
Rui Ueyama 739730e299 [WinLink][Driver] Add -entry command line option.
llvm-svn: 183034
2013-05-31 19:34:29 +00:00
Rui Ueyama ce42bcc304 [WinLink][Driver] Add support for -subsystem optional OS version number.
llvm-svn: 182988
2013-05-31 06:30:10 +00:00
Rui Ueyama d752c9cc89 Fix typo in file header.
llvm-svn: 182985
2013-05-31 04:46:44 +00:00
Rui Ueyama 7eb1d49a58 [Driver] Add unit tests for GnuLdDriver.
llvm-svn: 182980
2013-05-31 02:12:34 +00:00
Rui Ueyama a21397fb01 [WinLink] Add a test for Windows-style command line options.
llvm-svn: 182971
2013-05-30 23:29:28 +00:00
Rui Ueyama 5f037590de [lld][WinLink] Fix use-after-return and add unit tests.
llvm-svn: 182970
2013-05-30 23:17:58 +00:00
Michael J. Spencer 1eb3b89d92 [Core] Add parallel infrastructure to lld.
Uses ConcRT and PPL on Windows.

llvm-svn: 179397
2013-04-12 18:40:39 +00:00
Michael J. Spencer dfe85483d5 [Driver] Fix symlinked universal driver behavior and add a test.
llvm-svn: 178798
2013-04-04 22:04:16 +00:00
Michael J. Spencer 8af48f3864 [Core] Use LLVM's ErrorOr<T>.
llvm-svn: 172993
2013-01-20 21:27:05 +00:00
Michael J. Spencer aa3aa570dc [Core] Add iterator ranges.
This is based on code by Jeffrey Yasskin. It has been modified to compile
with MSVC and reformated to LLVM style.

llvm-svn: 172512
2013-01-15 06:55:25 +00:00
Michael J. Spencer 800de03813 [Core][ErrorOr] Add support for user error data.
llvm-svn: 170483
2012-12-19 00:51:07 +00:00