Commit Graph

32 Commits

Author SHA1 Message Date
Rui Ueyama 035025c0da Remove trailing whitespace characters.
llvm-svn: 235897
2015-04-27 17:18:04 +00:00
Chandler Carruth cd632dc486 Don't rely on the elf test suites inputs when testing the driver. We
already have a perfectly cromulent test archive in the driver inputs.

llvm-svn: 231976
2015-03-11 22:12:40 +00:00
Simon Atanasyan 82ae48eeb5 [Driver] Use paths explicitly provided by the -L option before default paths
User should be able to override default search paths using the -L
option.

http://reviews.llvm.org/D7902

llvm-svn: 230679
2015-02-26 20:09:50 +00:00
Rui Ueyama df230b21e3 Re-commit r225674: Convert other drivers to use WrapperNode.
The original commit had an issue with Mac OS dylib files. It didn't
handle fat binary dylib files correctly. This patch includes a fix.
A test for that case has already been committed in r225764.

llvm-svn: 226123
2015-01-15 04:34:31 +00:00
Rui Ueyama cfb2534ef8 Revert "Convert other drivers to use WrapperNode" and subsequent commits.
r225764 broke a basic functionality on Mac OS. This change reverts
r225764, r225766, r225767, r225769, r225814, r225816, r225829, and r225832.

llvm-svn: 225859
2015-01-14 00:21:34 +00:00
Rui Ueyama e8ecb2b144 Convert other drivers to use WrapperNode.
llvm-svn: 225764
2015-01-13 04:33:07 +00:00
Rui Ueyama a3eff3afd9 Make -core/-flavor options have higher priority than linker name
Also allows -core/flavor to appear at any position in the command line.
Patch from Oleg Ranevskyy!

http://reviews.llvm.org/D5384

llvm-svn: 218321
2014-09-23 18:09:38 +00:00
Simon Atanasyan 6790b14ebb [ELF] Fix the bug -- LLD crashes if the --whole-archive option
is around non-archive.

llvm-svn: 210530
2014-06-10 13:43:13 +00:00
Rui Ueyama b0e3b66fa5 Remove ordinals from Input Graph elements.
An ordinal is set to each child of Input Graph, but no one actually
uses it. The only piece of code that gets ordinaly values is
sortInputElements in InputGraph.cpp, but it does not actually do
anything -- we assign ordinals in increasing order just before
calling sort, so when sort is called it's already sorted. It's no-op.
We can simply remove it. No functionality change.

Differential Revision: http://llvm-reviews.chandlerc.com/D3270

llvm-svn: 205501
2014-04-03 02:21:44 +00:00
Shankar Easwaran 3d8de47f76 Fix trailing whitespace.
llvm-svn: 200182
2014-01-27 03:09:26 +00:00
Rui Ueyama c15e1b087b Add missing triples so that these tests pass on 32 bit arch.
llvm-svn: 198812
2014-01-09 00:07:20 +00:00
Joerg Sonnenberger 4dcee6960f Add default search path if -nostdlib is not provided.
Add basic emulation mapping for NetBSD/amd64, so that clang -m32 works
as expected.

llvm-svn: 198337
2014-01-02 19:18:36 +00:00
Shankar Easwaran a27fe1c918 [Gnu] -L paths is not positional.
Looks like -L paths are not positional. They need to be added to a list of
search paths and those needs to be searched when lld looks for a library.

llvm-svn: 195594
2013-11-25 03:55:34 +00:00
Shankar Easwaran a96f3a3da4 [lld][InputGraph] Change the Resolver to use inputGraph
Changes :-

a) Functionality in InputGraph to insert Input elements at any position
b) Functionality in the Resolver to use nextFile
c) Move the functionality of assigning file ordinals to InputGraph
d) Changes all inputs to MemoryBuffers
e) Remove LinkerInput, InputFiles, ReaderArchive

llvm-svn: 192081
2013-10-07 02:47:09 +00:00
Shankar Easwaran 7915ff34b7 [lld][LinkingContext][ELF] Allow different output file types.
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
2013-09-23 04:24:15 +00:00
Shankar Easwaran 70fefd515a [lld][ELF] Group command line options for better usage
llvm-svn: 191033
2013-09-19 20:07:06 +00:00
Joerg Sonnenberger 840d3daf01 Add support for --sysroot.
llvm-svn: 189826
2013-09-03 16:29:02 +00:00
Shankar Easwaran df4f12bb65 [lld][test] organize test directory. No change in functionality
* Renames few tests which had extension objtxt to test
* created core directory that contains all the core tests

llvm-svn: 189720
2013-08-31 05:59:52 +00:00
Shankar Easwaran d26c8e3463 [lld][LinkingContext] Atoms created from command line options should be 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
2013-08-31 05:27:38 +00:00
Rui Ueyama c4d793f2ad Remove an option starting an uppercase character so that the test does not depends on sort order.
llvm-svn: 189423
2013-08-28 00:01:57 +00:00
Rui Ueyama b5292e6295 Modify test to adopt r189416.
r189416 changed the order of command line options shown in help message,
so the test needs adjusting.

llvm-svn: 189417
2013-08-27 23:48:49 +00:00
Shankar Easwaran b8b42658ea [lld][Driver] Fix the unit test for lld gnu flavor
llvm-svn: 188982
2013-08-22 03:18:01 +00:00
Shankar Easwaran e44104b001 add InputGraph functionality
llvm-svn: 188958
2013-08-21 22:57:10 +00:00
Rafael Espindola 611db946c2 Return 0 when processing --help. This matches gnu ld and gold.
llvm-svn: 185655
2013-07-04 16:50:47 +00:00
Nick Kledzik c314b46e71 This is my Driver refactoring patch.
The major changes are:
1) LinkerOptions has been merged into TargetInfo
2) LinkerInvocation has been merged into Driver
3) Drivers no longer convert arguments into an intermediate (core) argument 
   list, but instead create a TargetInfo object and call setter methods on 
   it. This is only how in-process linking would work. That is, you can 
   programmatically set up a TargetInfo object which controls the linking.
4) Lots of tweaks to test suite to work with driver changes
5) Add the DarwinDriver
6) I heavily doxygen commented TargetInfo.h

Things to do after this patch is committed:
a) Consider renaming TargetInfo, given its new roll. 
b) Consider pulling the list of input files out of TargetInfo. This will 
   enable in-process clients to create one TargetInfo the re-use it with 
   different input file lists.
c) Work out a way for Drivers to format the warnings and error done in 
   core linking.

llvm-svn: 178776
2013-04-04 18:59:24 +00:00
Michael J. Spencer be03e2a861 [Core,Driver,ELF] Differentiate static and dynamic executables.
This also adds a simple relocation change for dynamic executables to
x86-64 ELF.

llvm-svn: 175208
2013-02-14 20:32:00 +00:00
Michael J. Spencer 7799d15f6e [Driver] Add -L and -l support.
llvm-svn: 174590
2013-02-07 06:47:17 +00:00
Shankar Easwaran 7381db059a add noinhibit exec option
llvm-svn: 172204
2013-01-11 15:11:47 +00:00
Shankar Easwaran 2ca8e7d733 support for adding linker defined symbols
llvm-svn: 172040
2013-01-10 03:16:27 +00:00
Michael J. Spencer 70d0e10c5f Target test fix.
llvm-svn: 171579
2013-01-05 00:47:15 +00:00
Michael J. Spencer bc7f2a7359 [Driver] Add x86-64 target.
llvm-svn: 171557
2013-01-04 23:34:29 +00:00
Michael J. Spencer 74f29afd58 [Driver] Add test.
llvm-svn: 169721
2012-12-10 02:53:10 +00:00