[all-commits] [llvm/llvm-project] 6a7549: [Driver] Define LinkOption and fix forwarded optio...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Jul 25 12:37:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a75496836ea14bcfd2f4b59d35a1cad4ac58cee
      https://github.com/llvm/llvm-project/commit/6a75496836ea14bcfd2f4b59d35a1cad4ac58cee
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-07-25 (Sat, 25 Jul 2020)

  Changed paths:
    M clang/include/clang/Driver/Options.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/test/Driver/gcc_forward.c
    M clang/test/Driver/gfortran.f90

  Log Message:
  -----------
  [Driver] Define LinkOption and fix forwarded options to GCC for linking

Many driver options are neither 'DriverOption' nor 'LinkerInput'. When gcc is
used for linking, these options get forwarded even if they don't have anything
to do with linking. Among these options, clang-specific ones can cause gcc to
error.

Just use 'OPT_Link_Group' and a new flag 'LinkOption' for options which already
have a group.

gfortran support apparently bit rots (which does not seem to make much sense). XFAIL the test.




More information about the All-commits mailing list