Commit Graph

13 Commits

Author SHA1 Message Date
Rui Ueyama e11187bce3 Define sys::path::convert_to_slash
This patch moves convertToUnixPathSeparator from LLD to LLVM.

Differential Revision: https://reviews.llvm.org/D28444

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@291414 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09 01:47:15 +00:00
Rafael Espindola 0252450d54 Revert r291221.
Should bring back the windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@291263 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 19:01:49 +00:00
Rui Ueyama cfca03737d Rename lld::stringize -> lld::toString.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@291223 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 10:04:35 +00:00
Rui Ueyama 70219f1749 Remove lld::convertToUnixPathSeparator.
Now TarWriter takes care of path separator conversion, so we don't
need to handle that in LLD.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@291221 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 09:38:43 +00:00
Rui Ueyama 03c1d58f2f Use TarWriter to create tar archives instead of cpio.
This is how we use TarWriter in LLD. Now LLD does not append
a file extension, so you need to pass `--reproduce foo.tar`
instead of `--reproduce foo`.

Differential Revision: https://reviews.llvm.org/D28103

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@291210 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 02:33:53 +00:00
Rui Ueyama 1bbdfa782b Fix Windows buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@288975 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 20:31:46 +00:00
Rui Ueyama 28293a5dce Make convertToUnixPathSeparator return a new string instead of mutating argument.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@288972 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 20:22:27 +00:00
George Rimar aab8f2ab8e [ELF] - Print absolute file name in errors when possible.
Currently LLD prints basename of source file name in error messages,
for example:
$ mkdir foo
$ echo 'void _start(void) { foobar(); }' > foo/bar.c
$ gcc -g -c foo/bar.c
$ bin/ld.lld -o out bar.o 
bin/ld.lld: error: bar.c:1: undefined symbol 'foobar'
$
This should say:
bin/ld.lld: error: foo/bar.c:1: undefined symbol 'foobar'

This is PR31299

Differential revision: https://reviews.llvm.org/D27506

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@288966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 19:42:25 +00:00
Davide Italiano e23f783bb7 [ELF] Don't replace path separators on *NIX.
Apparently this is wrong because it's legal to have a filename
on UNIX which contains a backslash.

Differential Revision:  https://reviews.llvm.org/D26734

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@287143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16 19:35:36 +00:00
George Rimar 2c6e96308e [ELF] - Fixed comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@286712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-12 06:27:42 +00:00
George Rimar bd10795ef6 [ELF] - Use backward slashes inside response files
Patch replaces forward slashes with backward inside response.txt

This is https://llvm.org/bugs/show_bug.cgi?id=30951.

Differential revision: https://reviews.llvm.org/D26443

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@286589 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11 13:23:13 +00:00
Peter Collingbourne 339617d474 Add qualification to fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@276720 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 02:10:56 +00:00
Peter Collingbourne 8018723e4d COFF: Implement /linkrepro flag.
This flag is implemented similarly to --reproduce in the ELF linker.

This patch implements /linkrepro by moving the cpio writer and associated
utility functions to lldCore, and using that implementation in both linkers.

One COFF-specific detail is that we store the object file from which the
resource files were created in our reproducer, rather than the resource
files themselves. This allows the reproducer to be used on non-Windows
systems for example.

Differential Revision: https://reviews.llvm.org/D22418

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@276719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 02:00:42 +00:00