[all-commits] [llvm/llvm-project] 26041e: Update link job for flang on windows

Diana via All-commits all-commits at lists.llvm.org
Mon Jun 20 00:34:01 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26041e17006cf30e9c2d06706fe6bd3fa818e356
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2022-06-20 (Mon, 20 Jun 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.h
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/MSVC.cpp
    M clang/lib/Driver/ToolChains/MinGW.cpp
    M flang/test/Driver/linker-flags.f90

  Log Message:
  Update link job for flang on windows

When linking a Fortran program, we need to add the runtime libraries to
the command line. This is exactly what we do for Linux/Darwin, but the
MSVC interface is slightly different (e.g. -libpath instead of -L).

We also remove oldnames and libcmt, since they're not needed at the
moment and they bring in more dependencies.

We also pass `/subsystem:console` to the linker so it can figure out the
right entry point. This is only needed for MSVC's `link.exe`. For LLD it
is redundant but doesn't hurt.

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

Co-authored-by: Markus M├╝tzel <markus.muetzel at gmx.de>

More information about the All-commits mailing list