Skip to content

Commit fc3106c

Browse files
committed
[LLD] [MinGW] Ignore the -rpath option
GNU ld silently accepts the -rpath option for Windows targets, as a no-op. This has lead to some build systems (and users) passing this option while building for Windows/MinGW, even if Windows doesn't have any concept like rpath. Older versions of Conan did include -rpath in the pkg-config files it generated, see e.g. https://github.com/conan-io/conan/blob/17c58f0c61931f9de218ac571cd97a8e0befa68e/conans/client/generators/pkg_config.py#L104-L114 and https://github.com/conan-io/conan/blob/17c58f0c61931f9de218ac571cd97a8e0befa68e/conans/client/build/compiler_flags.py#L26-L34 - and see mstorsjo/llvm-mingw#300 for user reports about this issue. Silently ignore the option in LLD for MinGW targets, to improve drop-in compatibility compared to GNU ld.
1 parent 4915fdd commit fc3106c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lld/MinGW/Options.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ defm: EqNoHelp<"minor-image-version">;
239239
def: F<"no-undefined">;
240240
def: F<"pic-executable">;
241241
defm: EqNoHelp<"plugin">;
242+
defm: EqNoHelp<"rpath">;
242243
defm: EqNoHelp<"sysroot">;
243244
def: F<"sort-common">;
244245
def: F<"start-group">;

0 commit comments

Comments
 (0)