[all-commits] [llvm/llvm-project] 83cec1: [clang] Change CodeGenOptions::RelaxELFRelocations...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Dec 31 22:24:51 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83cec143c76f4c76fe8ae28d6d836e8f7bd67891
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-12-31 (Sat, 31 Dec 2022)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/CodeGen/relax.c
    M clang/test/Driver/fuchsia.c
    M clang/test/Driver/ps4-ps5-relax-relocations.c
    M clang/test/Driver/relax.c
    M clang/test/Driver/relax.s
    M clang/tools/driver/cc1as_main.cpp

  Log Message:
  [clang] Change CodeGenOptions::RelaxELFRelocations/assembler defaults to match MC default

MC default was flipped in 2016.
CMake ENABLE_X86_RELAX_RELOCATIONS defaults to on in 2020 (c41a18cf61790fc898dcda1055c3efbf442c14c0).
It makes sense for the CodeGenOptions::RelaxELFRelocations to match, so
that most -cc1/-cc1as command lines won't have this option.

This also fixes a minor issue: -fno-plt -S will now use GOT for
__tls_get_addr calls, matching -fno-plt -c.

More information about the All-commits mailing list