[all-commits] [llvm/llvm-project] cd0712: [Driver] Don't alias -mstrict-align to -mno-unalig...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Mar 15 10:50:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd071253c70b3b37a0b9d113709ca9d49a83007e
      https://github.com/llvm/llvm-project/commit/cd071253c70b3b37a0b9d113709ca9d49a83007e
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Arch/AArch64.cpp
    M clang/lib/Driver/ToolChains/Arch/ARM.cpp
    M clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
    M clang/lib/Driver/ToolChains/Arch/RISCV.cpp
    M clang/test/Driver/apple-kext-mkernel.c
    M clang/test/Driver/loongarch-munaligned-access.c
    M clang/test/Driver/munaligned-access-unused.c
    M clang/test/Driver/riscv-features.c

  Log Message:
  -----------
  [Driver] Don't alias -mstrict-align to -mno-unaligned-access

GCC ports only supports one of the options, with -mstrict-align
preferred by newer ports. They reject adding -m[no-]unaligned-access to
newer ports that use -m[no-]strict-align.
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555).

We should not support aliases, either. Since the behavior has been
long-time for ARM (a146a48349c965932dcf304ffb8155b25307f245), support
both forms for ARM for now but remove -m[no-]unaligned-access for
RISC-V/LoongArch (see also
https://github.com/riscv-non-isa/riscv-c-api-doc/pull/62).

While here, add TargetSpecific to ensure errors on unsupported targets
(https://reviews.llvm.org/D151590) and remove unneeded CC1 options.

Pull Request: https://github.com/llvm/llvm-project/pull/85350



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list