[all-commits] [llvm/llvm-project] 4a16f6: [Driver][X86] Reject unsupported value for -mabi=

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri May 26 09:53:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a16f65fc83df494318ced1d894f6b1e562d330c
      https://github.com/llvm/llvm-project/commit/4a16f65fc83df494318ced1d894f6b1e562d330c
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Arch/X86.cpp
    R clang/test/Driver/mabi.c
    A clang/test/Driver/x86-mabi.c

  Log Message:
  -----------
  [Driver][X86] Reject unsupported value for -mabi=

-mabi= was incorrectly claimed before D134671. -mabi=sysv appears to be
somewhat common in open-source packages, even if it was not intended to
be supported by Clang.
(For common options supported by multiple architectures, it's easy to
forget to report an error on unsupported targets. Unfortunately
the driver infrastructure doesn't make this less error-prone.)

On x86, support -mabi=sysv for non-Windows targets and -mabi=ms for Windows,
and remove the spurious -Wunused-command-line-argument warning.

With this change, all popular architectures claim -mabi=, so we don't
have to worry much about -Wunused-command-line-argument for other
architectures.

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




More information about the All-commits mailing list