-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
My makefile passes the rpath
option to the linker, even if the target does not use any shared objects. This works fine on Linux, where my project uses either static or dynamic linking, and it has worked fine on Cygwin, where my project uses only static linking.
I have recently tried llvm-mingw. It seems that the rpath
option in the linker ld.lld.exe
is not recognized, regardless of the whether any shared objects are used or not.
$ ld --version
GNU ld (GNU Binutils) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
ld.lld.exe --version
LLD 14.0.0 (compatible with GNU linkers)
Of course, these are different linkers, but according to https://lld.llvm.org/
LLD is a drop-in replacement for the GNU linkers that accepts the same command line arguments and linker scripts as GNU.
While it is still possible that lld
and ld
subtly differ in their behavior, I am wondering whether not accepting the rpath
option is a deliberate modification for the LLVM port to Windows. If so, I suggest that accepting but ignoring the rpath
option is a better policy.