[all-commits] [llvm/llvm-project] 69f76c: [LLD] [MinGW] Recognize the -rpath option (#102886)

Martin Storsjö via All-commits all-commits at lists.llvm.org
Sat Aug 17 14:44:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 69f76c782b554a004078af6909c19a11e3846415
      https://github.com/llvm/llvm-project/commit/69f76c782b554a004078af6909c19a11e3846415
  Author: Martin Storsjö <martin at martin.st>
  Date:   2024-08-18 (Sun, 18 Aug 2024)

  Changed paths:
    M lld/MinGW/Driver.cpp
    M lld/MinGW/Options.td
    M lld/test/MinGW/driver.test

  Log Message:
  -----------
  [LLD] [MinGW] Recognize the -rpath option (#102886)

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 https://github.com/mstorsjo/llvm-mingw/issues/300 for user
reports about this issue.

Recognize the option in LLD for MinGW targets, to improve drop-in
compatibility compared to GNU ld, but produce a warning to alert users
that the option really has no effect for these targets.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list