- Sep 19, 2017
-
-
Rui Ueyama authored
llvm-svn: 313586
-
Zachary Turner authored
NFC intended here, this only updates clang and lld's lit configs to use some helper functionality in the lit.llvm submodule. llvm-svn: 313579
-
- Sep 18, 2017
-
-
Rui Ueyama authored
"Repl" member is guranteed to have a non-null pointer. If an input section is not merged by ICF, "Repl" points to "this". Otherwise, it points to some other section. It must not be NULL. llvm-svn: 313556
-
Davide Italiano authored
This is not really OK in C++11, and GCc triggers a warning. We can switch back to default arguments when C++14 will be the minimum version of the standard supported, see: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#974 Ack'ed by Rafael. llvm-svn: 313550
-
George Rimar authored
llvm-svn: 313523
-
George Rimar authored
Does not seem we need to set SectionIndex here. It is set in finalizeSections() later. Differential revision: https://reviews.llvm.org/D37815 llvm-svn: 313522
-
- Sep 16, 2017
-
-
Rui Ueyama authored
r303378 was submitted because r303374 (Merge IAT and ILT) made lld's output incompatible with the Binding feature. Now that r303374 was reverted, we do not need to keep this change. Pointed out by pcc. llvm-svn: 313414
-
Rui Ueyama authored
llvm-svn: 313408
-
Zachary Turner authored
This is a resubmission of r313270. It broke standalone builds of compiler-rt because we were not correctly generating the llvm-lit script in the standalone build directory. The fixes incorporated here attempt to find llvm/utils/llvm-lit from the source tree returned by llvm-config. If present, it will generate llvm-lit into the output directory. Regardless, the user can specify -DLLVM_EXTERNAL_LIT to point to a specific lit.py on their file system. This supports the use case of someone installing lit via a package manager. If it cannot find a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or invalid, then we print a warning that tests will not be able to run. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313407
-
- Sep 15, 2017
-
-
Rui Ueyama authored
llvm-svn: 313396
-
Rafael Espindola authored
This fixes pr34301. As the bug points out, we want to keep some relocations with undefined weak symbols. This means that we cannot always claim that these symbols are not preemptible as we do now. Unfortunately, we cannot also just always claim that they are preemptible. Doing so would, for example, cause us to try to create a plt entry when we don't even have a dynamic symbol table. What almost works is to say that weak undefined symbols are preemptible if and only if we have a dynamic symbol table. Almost because we don't want to fail the build trying to create a copy relocation to a weak undefined. llvm-svn: 313372
-
George Rimar authored
Patch removes one of OutputSectionFactory::addInputSec methods. That allows to simplify reporting of discarded sections and should help to D37561. Differential revision: https://reviews.llvm.org/D37735 llvm-svn: 313361
-
Zachary Turner authored
This patch is still breaking several multi-stage compiler-rt bots. I already know what the fix is, but I want to get the bots green for now and then try re-applying in the morning. llvm-svn: 313335
-
Rafael Espindola authored
_gp points to a position in the file, so it is not really absolute. It is also simpler to not force it to be absolute, so if there is no strong ABI requirement we should not do it. llvm-svn: 313333
-
Reid Kleckner authored
llvm-svn: 313330
-
- Sep 14, 2017
-
-
Rui Ueyama authored
llvm-svn: 313289
-
Rui Ueyama authored
GNU ld manual says that multi-letter long option can be prefixed with either -- or -. Therefore, we should accept not only --subsystem but also -subsystem, for example. There is one exception. If an option starts with "o", it should only be prefixed with -- to avoid ambiguity with -o<filename> option. Differential Revision: https://reviews.llvm.org/D37825 llvm-svn: 313286
-
Rui Ueyama authored
Differential Revision: https://reviews.llvm.org/D37823 llvm-svn: 313285
-
Zachary Turner authored
This patch simplifies LLVM's lit infrastructure by enforcing an ordering that a site config is always run before a source-tree config. A significant amount of the complexity from lit config files arises from the fact that inside of a source-tree config file, we don't yet know if the site config has been run. However it is *always* required to run a site config first, because it passes various variables down through CMake that the main config depends on. As a result, every config file has to do a bunch of magic to try to reverse-engineer the location of the site config file if they detect (heuristically) that the site config file has not yet been run. This patch solves the problem by emitting a mapping from source tree config file to binary tree site config file in llvm-lit.py. Then, during discovery when we find a config file, we check to see if we have a target mapping for it, and if so we use that instead. This mechanism is generic enough that it does not affect external users of lit. They will just not have a config mapping defined, and everything will work as normal. On the other hand, for us it allows us to make many simplifications: * We are guaranteed that a site config will be executed first * Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere. * We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line. * It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects. * All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone. One potentially noteworthy thing that was required to implement this change is that whereas the ninja check targets previously used the first method to spawn lit, they now use the second. In particular, you can no longer run lit.py against the source tree while specifying the various `foo_site_config=<path>` parameters. Instead, you need to run llvm-lit.py. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313270
-
- Sep 13, 2017
-
-
Rui Ueyama authored
llvm-svn: 313204
-
Rafael Espindola authored
The isShared case was handled by the isInCurrentDSO check. llvm-svn: 313190
-
Rafael Espindola authored
llvm-svn: 313188
-
Rui Ueyama authored
Arg instances can be claimed. After claimed, its `isClaimed` function returns true. We do not use that notion in lld, so using NoClaim versions of functions is just confusing. This patch is to just use hasArg instead of hasArgNoClaim. llvm-svn: 313187
-
Rafael Espindola authored
llvm-svn: 313184
-
Rui Ueyama authored
There are no alises handled by this switch, but getUnaliasesdOption is preferred way of doing this. This is also consistent with ELF and COFF. llvm-svn: 313180
-
Rui Ueyama authored
llvm-svn: 313178
-
Martin Storsjö authored
This is how the flag is documented in GNU binutils ld; -Bstatic only applies to -l options after it, until the next -Bdynamic. Differential Revision: https://reviews.llvm.org/D37794 llvm-svn: 313175
-
Martin Storsjö authored
In MinGW configurations (GCC, or clang with a *-windows-gnu target), the -export directives in the object file contains the undecorated symbol name, while it is decorated in MSVC configurations. (On the command line, link.exe takes an undecorated symbol name for the -export argument though.) Differential Revision: https://reviews.llvm.org/D37772 llvm-svn: 313174
-
Rafael Espindola authored
This reduces the size of SharedSymbol which in turn reduces the size of Symbol from 88 to 80 bytes. llvm-svn: 313154
-
NAKAMURA Takumi authored
llvm-svn: 313129
-
George Rimar authored
There is no need to scan over all input sections for relocatable output. As we do not process or scan relocations anyways. Patch moves check for Config->Relocatable out to avoid that and also removes excessive check for isa<EhInputSection> from first for loop. It is excessive because we handle all of them in a second for loop below. That all allowed to simplify code. Differential revision: https://reviews.llvm.org/D37746 llvm-svn: 313127
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D37761 llvm-svn: 313125
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D37769 llvm-svn: 313124
-
Martin Storsjö authored
This fixes PR31824. Differential Revision: https://reviews.llvm.org/D37709 llvm-svn: 313123
-
Rafael Espindola authored
This should fix the lto bootstrap. It is somewhat hard to remember about lazy symbols deep down in the link. It might be worth it replacing them with undefined symbols once we are done adding files. llvm-svn: 313103
-
Rui Ueyama authored
llvm-svn: 313095
-
Rui Ueyama authored
llvm-svn: 313094
-
Ben Dunbobbin authored
https://reviews.llvm.org/rL312796 meant that references to garbage collected common symbols would cause a segfault. This change fixes the behaviour for references to stripped common symbols. Differential Revision: https://reviews.llvm.org/D37718 llvm-svn: 313086
-
- Sep 12, 2017
-
-
Rafael Espindola authored
It is not needed since it is always 0. llvm-svn: 313076
-
Martin Storsjö authored
On i386, the --entry parameter to GNU ld is supposed to be a decorated symbol name, while it is an undecorated name in link.exe. Differential Revision: https://reviews.llvm.org/D37710 llvm-svn: 313066
-