[llvm-branch-commits] [clang] [llvm] [lld] [docs] Add release notes for Windows specific changes in 18.x (PR #80011)

Martin Storsjö via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 30 09:12:26 PST 2024


================
@@ -41,9 +41,25 @@ COFF Improvements
 * Added support for ``--time-trace`` and associated ``--time-trace-granularity``.
   This generates a .json profile trace of the linker execution.
 
+* Prefer library paths specified with ``-libpath:`` over the implicitly
+  detected toolchain paths.
+
 MinGW Improvements
 ------------------
 
+* Added support for many LTO and ThinLTO options.
+
+* LLD no longer tries to autodetect and pick up MSVC/WinSDK installations
----------------
mstorsjo wrote:

In mingw mode, one shouldn't use MSVC/WinSDK (headers/)libraries - there's really no use case for that.

The root cause is that in mingw mode, one always link by calling the compiler driver (just like for regular unix targets), which passes all the necessary search paths to the linker. In MSVC style environments, one usually invokes the linker directly (`link.exe` or `lld-link`), and it picks up a bunch of implicit search paths (from the environment variable `LIB`, and LLD can also look for MSVC installs in default paths and/or based on registry or other things, IIRC). When operating in mingw mode, those implicit default paths are only a potential source of unexpected behaviours and surprises, so there's no opt-in.

What about:
> LLD no longer tries to autodetect and use library paths from MSVC/WinSDK installations when run in MinGW mode; that mode of operation shouldn't ever be needed in MinGW mode, and could be a source of unexpected behaviours.


https://github.com/llvm/llvm-project/pull/80011


More information about the llvm-branch-commits mailing list