The previously used syntax, -Wl,-pdb,<file>, was the originally
supported one in lld (since 2018). Later (in 2019) the second
syntax was added, allowing both -Wl,-pdb=<file> and -Wl,-pdb,<file>.
(This other parameter syntax allows easier distinguishing an empty
argument, for letting the linker implicitly pick the file name.)
Move over to using the more modern syntax - reducing the usage of
the old form of the option. This potentially allows deprecating
the original syntax and maybe allows using --pdb as a boolean
flag for implying an automatically named PDB file (which currently
requires using the awkward syntax "--pdb=").
Also prefer the long two dashes form, i.e. --pdb instead of -pdb;
the single dash form is only allowed by getopt when there
are no conflicts with single-letter options, while the form with
two dashes is unambiguous.
Rust uses the ".rlib" extension for intermediate libraries which it
passes to the linker. Detect them through signature so that winegcc will
not try to compile it.
Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The flag does nothing if -nodefaultlibs or -nostdlib were given, because
the driver does not automatically link to libgcc/compiler-rt in that
case. Clang will warn about this, which is annoying, which clutters up
the output, and which makes it impossible to use -Werror when building
with Clang.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Use a style consistent with the rest of the file.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
On macOS unixlibs that link to ntdll.so currently fail to load.
It appears the macOS loader needs to be able to locate the file
even if the library is already loaded.
This patch changes the LC_ID_DYLIB name of ntdll.so to
"@loader_path/ntdll.so" so that when other unixlibs link against this
they will insert that name into their LC_LOAD_DYLIB entry for
ntdll.so.
While changing only ntdll.so is necessary, for simplicity this patch
changes all unixlibs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51632
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These arguments need to be in the correct position so they need to go in
the files array.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
While you could get 90% of the way with "-lpthread", supporting -pthread
should be more reliable and is required for build systems like meson
that have special handling for the threads dependency.
Since this is both a compiler (really preprocessor) and linker option,
we can't just add it to is_linker_arg().
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
For more compatibility with mingw-gcc. Since meson always names object
files with a .obj extension when using mingw, this improves
compatibility with meson.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This is especially important for msvcrt headers, which need to be used
instead of system ones.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
We use -nodefaultlibs now, so we don't need to worry about GCC additions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>