[all-commits] [llvm/llvm-project] a23bf1: [clang] [MinGW] Pass LTO options to the linker

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Aug 24 13:15:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a23bf1786be7c0738a4cf999c2957155bb32d5af
      https://github.com/llvm/llvm-project/commit/a23bf1786be7c0738a4cf999c2957155bb32d5af
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/MinGW.cpp
    M clang/test/Driver/mingw-lto.c

  Log Message:
  -----------
  [clang] [MinGW] Pass LTO options to the linker

This matches what is done on other platforms too.

This fixes one part of
https://github.com/mstorsjo/llvm-mingw/issues/349.

Differential Revision: https://reviews.llvm.org/D158411


  Commit: 5c92c9f34a7dba804479acef62c576d1a170ef1f
      https://github.com/llvm/llvm-project/commit/5c92c9f34a7dba804479acef62c576d1a170ef1f
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

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

  Log Message:
  -----------
  [LLD] [MinGW] Pass LLVM specific LTO options through to lld-link

This is modelled after how the ELF driver does it (see e.g.
https://reviews.llvm.org/D78158 for the source of the ELF
implementation); we need to intercept some options, but ignore GCC
specific ones that GCC passes regardless of whether GCC is using
LTO or not.

This is the second part of the fix for
https://github.com/mstorsjo/llvm-mingw/issues/349.

Differential Revision: https://reviews.llvm.org/D158412


Compare: https://github.com/llvm/llvm-project/compare/7cabb54f3867...5c92c9f34a7d


More information about the All-commits mailing list