| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed By: ruiu, MaskRay
Differential Revision: https://reviews.llvm.org/D72196
|
|
|
|
|
|
|
| |
This reverts commit 17e37ba57a696198c9744eeba4f8f293f155587a
because it introduced a circular dependency between Core and Common.
Because d0371f473675ede1d79a615ec4fdf0cf5368944c fixed a build issue,
we no longer need that dependency.
|
|
|
|
|
| |
b11386f9be9b2dc7276a758d64f66833da10bdea broke lld build
if `-DBUILD_SHARED_LIBS=ON` is passed to CMake.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is for those who use lld as a library. Context:
https://reviews.llvm.org/D70287
This patch adds a new parmeter to lld::*::link() so that we can pass
an raw_ostream object representing stdout. Previously, lld::*::link()
took only an stderr object.
Justification for making stdoutOS and stderrOS mandatory: I wanted to
make link() functions to take stdout and stderr in that order.
However, if we change the function signature from
bool link(ArrayRef<const char *> args, bool canExitEarly,
raw_ostream &stderrOS = llvm::errs());
to
bool link(ArrayRef<const char *> args, bool canExitEarly,
raw_ostream &stdoutOS = llvm::outs(),
raw_ostream &stderrOS = llvm::errs());
, then the meaning of existing code that passes stderrOS silently
changes (stderrOS would be interpreted as stdoutOS). So, I chose to
make existing code not to compile, so that developers can fix their
code.
Differential Revision: https://reviews.llvm.org/D70292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Error handling in liblldCore and the Darwin toolchain prints to an
output stream. A TODO in the project explained that a diagnostics
interface resembling Clang's should be added.
For now, the simple diagnostics interface defined in liblldCommon seems
like an improvement. It prints colors when they're available, uses locks
for thread-safety, and abstracts away the `"error: "` and newline
literal strings that litter the Darwin toolchain code.
To use the liblldCommon error handler, a link dependency is added to
the liblldDriver library.
Test Plan:
1. check-lld
2. Invoke `ld64.lld -r` in a terminal that supports color output.
Confirm that "ld64.lld: error: -arch not specified and could not be inferred"
is output, and that the "error:" is colored red!
Reviewers: ruiu, smeenai
Reviewed By: ruiu
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D47998
llvm-svn: 334466
|
|
|
|
|
|
|
|
|
|
| |
New lld's files are spread under lib subdirectory, and it isn't easy
to find which files are actually maintained. This patch moves maintained
files to Common subdirectory.
Differential Revision: https://reviews.llvm.org/D37645
llvm-svn: 314719
|
|
|
|
| |
llvm-svn: 309913
|
|
|
|
| |
llvm-svn: 308526
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this, when building with shared BUILD_SHARED_LIBS=ON
I get errors such as:
lib/Core/Reader.cpp:40: error: undefined reference to
'llvm::identify_magic(llvm::StringRef)'
Differential Revision: https://reviews.llvm.org/D34004
llvm-svn: 304932
|
|
|
|
| |
llvm-svn: 304874
|
|
|
|
| |
llvm-svn: 304873
|
|
|
|
|
|
|
|
|
|
|
|
| |
This creates a new library called BinaryFormat that has all of
the headers from llvm/Support containing structure and layout
definitions for various types of binary formats like dwarf, coff,
elf, etc as well as the code for identifying a file from its
magic.
Differential Revision: https://reviews.llvm.org/D33843
llvm-svn: 304864
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D33024
llvm-svn: 302748
|
|
|
|
| |
llvm-svn: 302697
|
|
|
|
| |
llvm-svn: 302363
|
|
|
|
| |
llvm-svn: 302295
|
|
|
|
| |
llvm-svn: 302291
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is one step in preparation of raising this up to
LLVM. This hides all of the Executor stuff in a private
implementation file, leaving only the core algorithms and
the TaskGroup class exposed. In doing so, fix up all the
variable names to conform to LLVM style.
Differential Revision: https://reviews.llvm.org/D32890
llvm-svn: 302288
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D29445
llvm-svn: 296542
|
|
|
|
| |
llvm-svn: 293996
|
|
|
|
| |
llvm-svn: 293986
|
|
|
|
| |
llvm-svn: 293966
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: llvm/CodeGen/CommandFlags.h a utility function InitTargetOptionsFromCodeGenFlags which is used to set target options from flags based on the command line. The command line flags are stored in globals defined in the same file, and including the file in multiple places causes the globals to be defined multiple times, leading to linker errors. This change adds a single place in lld where these globals are defined and exports only the utility function. This makes it possible to call InitTargetOptionsFromCodeGenFlags from multiple places in lld, which a follow-up change will do.
Reviewers: davide, ruiu
Reviewed By: davide, ruiu
Subscribers: mgorny
Differential Revision: https://reviews.llvm.org/D29058
llvm-svn: 293965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Lld's build had a couple of issues which prevented a successfull
LLVM_LINK_LLVM_DYLIB compilation.
- add_llvm_library vs llvm_add_library: One adds a library to libLLVM.so, other
one doesn't. Lld was using the wrong one, causing symbols to be mupltiply
defined in things linking to libLLVM.
- confusion when to use LINK_LIBS vs LINK_COMPONENTS in llvm_add_library
- not using LLVM_LINK_COMPONENTS for add_lld_tool
With these fixes lld compiles and it's test suite passes both in
LLVM_LINK_LLVM_DYLIB mode and without it.
Reviewers: ruiu, beanz
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28397
llvm-svn: 291432
|
|
|
|
|
|
|
|
| |
This patch moves convertToUnixPathSeparator from LLD to LLVM.
Differential Revision: https://reviews.llvm.org/D28444
llvm-svn: 291414
|
|
|
|
|
|
| |
Should bring back the windows bots.
llvm-svn: 291263
|
|
|
|
| |
llvm-svn: 291223
|
|
|
|
|
|
|
| |
Now TarWriter takes care of path separator conversion, so we don't
need to handle that in LLD.
llvm-svn: 291221
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 291210
|
|
|
|
| |
llvm-svn: 288975
|
|
|
|
|
|
| |
argument.
llvm-svn: 288972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 288966
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 287143
|
|
|
|
| |
llvm-svn: 286712
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 286589
|
|
|
|
|
|
|
|
| |
This would trigger an assertion at runtime otherwise.
Differential Revision: https://reviews.llvm.org/D26482
llvm-svn: 286562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we do this piece of code to iterate over all input sections.
for (elf::ObjectFile<ELFT> *F : Symtab.getObjectFiles())
for (InputSectionBase<ELFT> *S : F->getSections())
It turned out that this mechanisms doesn't work well with synthetic
input sections because synthetic input sections don't belong to any
input file.
This patch defines a vector that contains all input sections including
synthetic ones.
llvm-svn: 286051
|
|
|
|
|
|
|
|
| |
other minor fixes.
Differential revision: https://reviews.llvm.org/D26320
llvm-svn: 286030
|
|
|
|
|
|
|
|
| |
other minor fixes.
Differential revision: https://reviews.llvm.org/D26293
llvm-svn: 286000
|
|
|
|
| |
llvm-svn: 284671
|
|
|
|
|
|
| |
The code in lib/ could use a lot of love :(
llvm-svn: 278506
|
|
|
|
| |
llvm-svn: 278505
|
|
|
|
| |
llvm-svn: 278327
|
|
|
|
| |
llvm-svn: 278181
|
|
|
|
| |
llvm-svn: 277926
|
|
|
|
| |
llvm-svn: 277760
|
|
|
|
| |
llvm-svn: 276720
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 276719
|