[all-commits] [llvm/llvm-project] 2aedfd: [CodeGen] Default TargetOptions::RelaxELFRelocatio...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jan 5 13:29:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aedfdd9b82e6c72a28576d0e8ea854f1300ff4e
      https://github.com/llvm/llvm-project/commit/2aedfdd9b82e6c72a28576d0e8ea854f1300ff4e
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M lld/ELF/LTO.cpp
    M llvm/include/llvm/Target/TargetOptions.h
    M llvm/lib/CodeGen/CommandFlags.cpp
    M llvm/test/LTO/Resolution/X86/not-prevailing-variables.ll
    M llvm/test/ThinLTO/X86/cache-config.ll

  Log Message:
  -----------
  [CodeGen] Default TargetOptions::RelaxELFRelocations to true

MC and lld/ELF defaults were flipped in 2016. For Clang: CMake
ENABLE_X86_RELAX_RELOCATIONS defaults to on in 2020. It makes sense for
the TargetOptions default to be true now.

R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX require GNU ld newer than 2015-10
(subsumed by the current requirement of -fbinutils-version=).

This should fix `rustc -Z plt=no` PIC relocatable files with GNU ld.
(See https://github.com/rust-lang/rust/pull/106380)




More information about the All-commits mailing list