[all-commits] [llvm/llvm-project] 041ffc: [Clang][Driver] Warn on invalid Arm or AArch64 bar...

Michael Platings via All-commits all-commits at lists.llvm.org
Fri Jun 23 03:54:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 041ffc155fd7d154af1ea59853fbe5932d0216d3
      https://github.com/llvm/llvm-project/commit/041ffc155fd7d154af1ea59853fbe5932d0216d3
  Author: Michael Platings <michael.platings at arm.com>
  Date:   2023-06-23 (Fri, 23 Jun 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticCommonKinds.td
    M clang/lib/Driver/Driver.cpp
    M clang/test/CodeGen/aapcs64-align.cpp
    M clang/test/CodeGen/aarch64-sign-return-address.c
    M clang/test/CodeGen/arm_acle.c
    M clang/test/CodeGenCXX/float16-declarations.cpp
    M clang/test/Driver/aarch64-cssc.c
    M clang/test/Driver/aarch64-d128.c
    M clang/test/Driver/aarch64-hbc.c
    M clang/test/Driver/aarch64-ite.c
    M clang/test/Driver/aarch64-lrcpc3.c
    M clang/test/Driver/aarch64-ls64.c
    M clang/test/Driver/aarch64-lse128.c
    M clang/test/Driver/aarch64-mops.c
    M clang/test/Driver/aarch64-mte.c
    M clang/test/Driver/aarch64-perfmon.c
    M clang/test/Driver/aarch64-predres.c
    M clang/test/Driver/aarch64-rand.c
    M clang/test/Driver/aarch64-ras.c
    M clang/test/Driver/aarch64-rdm.c
    M clang/test/Driver/aarch64-ssbs.c
    M clang/test/Driver/aarch64-the.c
    M clang/test/Driver/arm-matrix-multiply.c
    M clang/test/Driver/arm-sb.c
    M clang/test/Driver/constructors.c
    M clang/test/Driver/unsupported-target-arch.c
    M clang/test/Frontend/gnu-mcount.c
    M clang/test/Headers/arm-fp16-header.c
    M clang/test/Headers/arm-neon-header.c
    M clang/test/Preprocessor/aarch64-target-features.c
    M llvm/test/CodeGen/AArch64/andcompare.ll
    M llvm/test/CodeGen/AArch64/andorbrcompare.ll
    M llvm/test/CodeGen/AArch64/blockaddress.ll
    M llvm/test/CodeGen/AArch64/extern-weak.ll
    M llvm/test/CodeGen/AArch64/init-array.ll
    M llvm/test/CodeGen/AArch64/literal_pools_float.ll
    M llvm/test/CodeGen/AArch64/neg-selects.ll
    M llvm/test/CodeGen/AArch64/qmovn.ll
    M llvm/test/CodeGen/AArch64/select-constant-xor.ll
    M llvm/test/MC/AArch64/armv8.9a-clrbhb.s

  Log Message:
  -----------
  [Clang][Driver] Warn on invalid Arm or AArch64 baremetal target triple

A common user mistake is specifying a target of aarch64-none-eabi or
arm-none-elf whereas the correct names are aarch64-none-elf &
arm-none-eabi. Currently if a target of aarch64-none-eabi is specified
then the Generic_ELF toolchain is used, unlike aarch64-none-elf which
will use the BareMetal toolchain. This is unlikely to be intended by the
user so issue a warning that the target is invalid.

The target parser is liberal in what input it accepts so invalid triples
may yield behaviour that's sufficiently close to what the user intended.
Therefore invalid triples were used in many tests. This change updates
those tests to use valid triples.
One test (gnu-mcount.c) relies on the Generic_ELF toolchain behaviour so
change it to explicitly specify aarch64-unknown-none-gnu as the target.

Reviewed By: peter.smith, DavidSpickett

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




More information about the All-commits mailing list