In this mode, we retain the symbol table, but skip the actual debug
information.
Differential Revision: https://reviews.llvm.org/D48745
llvm-svn: 335947
This allows producing pdb debug info. This is an LLD specific option
since GCC and GNU binutils doesn't support the PDB file format.
Differential Revision: https://reviews.llvm.org/D46796
llvm-svn: 332327
These are required for handling circular dependencies between
static libraries, which is something that lld-link always does without
any extra parameters.
Differential Revision: https://reviews.llvm.org/D43786
llvm-svn: 326172
The COFF linker automatically sets the IMAGE_DLL_CHARACTERISTICS_NO_SEH
when suitable, similarly to link.exe.
Differential Revision: https://reviews.llvm.org/D41275
llvm-svn: 320861
LLD already writes a build id if debug info is enabled.
Some projects set --pie-executable to avoid GNU ld bugs about stripping
base relocations from an executable when they actually are used.
Since -fixed:no is the default (and we don't support setting the
-fixed option via the MinGW frontend), we don't need to handle this.
--disable-auto-image-base is ignored just like --enable-auto-image-base
(as we ignore from before).
Differential Revision: https://reviews.llvm.org/D40031
llvm-svn: 318285
GNU ld doesn't seem to support --icf at all, but this was suggested
in D39885, and GNU gold seems to support it.
Differential Revision: https://reviews.llvm.org/D40019
llvm-svn: 318283
All of these are disabled by default in GNU ld, but enabled by default
in lld.
Disable dynamicbase by default since it potentially could cause
compatibility issues, but just ignore the others since the lld
default should be fine for most concievable cases.
Differential Revision: https://reviews.llvm.org/D40017
llvm-svn: 318281
In GNU ld, this option is only available on i386, not on x86_64
(where it's enabled by default with no option to disable it either).
Differential Revision: https://reviews.llvm.org/D40015
llvm-svn: 318280
In GNU ld, this option is enabled by default, but can be set
to reduce some warnings.
For lld, ignore the flag (for now); in case linking still succeeds
everything should be fine, if not, it should be clear to the user
what part failed (possibly requiring adjusting the user project
to not rely on this feature), instead of straight out failing due to
an unknown flag.
Differential Revision: https://reviews.llvm.org/D39330
llvm-svn: 316693
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
This adds support for passing LTO flags to the MINGW driver
in GNU LD style i.e. -mllvm flag -> /mllvm:flag
Reviewers: ruiu, mstorsjo
Differential Revision: https://reviews.llvm.org/D37712
llvm-svn: 312956
If the sysroot parameter is passed to the clang frontend, clang
already uses it to find libraries and adds -L options for it, but
also passes it on to the linker. Therefore we can get pretty far
by just ignoring it altogether.
Differential Revision: https://reviews.llvm.org/D37707
llvm-svn: 312945
Pass the -verbose option through to the COFF linker, and show the
arguments passed to it. If the -### option is specified, just show
the produced argument list and exit, just like in clang.
Replace the first argument with "lld-link" in order to produce a
correct command line.
Differential Revision: https://reviews.llvm.org/D37706
llvm-svn: 312944
When building COFF programs many targets such as mingw prefer
to have a gnu ld frontend. Rather then having a fully fledged
standalone driver we wrap a shim around the LINK driver.
Extra tests were provided by mstorsjo
Reviewers: mstorsjo, ruiu
Differential Revision: https://reviews.llvm.org/D33880
llvm-svn: 312926