[all-commits] [llvm/llvm-project] 20ca74: [llvm] Force TLSDESC for all TLS access in Fuchsia...

Paul Kirth via All-commits all-commits at lists.llvm.org
Wed Feb 11 11:14:09 PST 2026


  Branch: refs/heads/users/ilovepi/lto-tlsdesc
  Home:   https://github.com/llvm/llvm-project
  Commit: 20ca7413dafbc52e12aa71701661fbe4dd5f507a
      https://github.com/llvm/llvm-project/commit/20ca7413dafbc52e12aa71701661fbe4dd5f507a
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/test/CodeGen/RISCV/tls-models.ll
    M llvm/test/CodeGen/X86/tls-desc.ll

  Log Message:
  -----------
  [llvm] Force TLSDESC for all TLS access in Fuchsia code

Fuchsia no longer supports TLS access via __tls_get_addr, and only
supports the TLSDESC ABI on all target machines.

Though we already set Fuchsia as enabling TLSDESC by default, LLD's LTO
pipeline is initialized with an empty target triple, and thus does not
correctly select the correct codegen options for Fuchsia's ABI. Instead,
we can additionally check if Fuchsia is the actual target if the option
isn't set, since useTLSDESC() is only called later, when a non-default
target triple will be available.

The alternative is to rework how LLD initializes the LTO code generation
options, so that it selects the correct target, and initializes them
correctly. However, that's a more invasive change, and would need some
discussion to make sure that is handled correctly across all of LLDs
supported formats (e.g. ELF, Mach-O, COFF, etc.).


  Commit: ff93b7e5b486778cc275d2363332124cb3cc6097
      https://github.com/llvm/llvm-project/commit/ff93b7e5b486778cc275d2363332124cb3cc6097
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/tools/clang-nvlink-wrapper/ClangNVLinkWrapper.cpp
    M lld/COFF/LTO.cpp
    M lld/ELF/LTO.cpp
    M lld/MachO/LTO.cpp
    M lld/wasm/LTO.cpp
    M llvm/include/llvm/LTO/Config.h
    M llvm/include/llvm/LTO/LTO.h
    M llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/lib/LTO/ThinLTOCodeGenerator.cpp
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/tools/llvm-lto2/llvm-lto2.cpp

  Log Message:
  -----------
  Redesign how TargetOptions are used in LTO


  Commit: e6806711b6fa20e10f9070335b8dcb51198ebe7d
      https://github.com/llvm/llvm-project/commit/e6806711b6fa20e10f9070335b8dcb51198ebe7d
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M lld/COFF/LTO.cpp
    M llvm/include/llvm/LTO/Config.h
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/lib/LTO/ThinLTOCodeGenerator.cpp

  Log Message:
  -----------
  clang format


  Commit: 9fc9646ccd5f06e58497799f3ffc47bb8290f2d4
      https://github.com/llvm/llvm-project/commit/9fc9646ccd5f06e58497799f3ffc47bb8290f2d4
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M lld/COFF/LTO.cpp
    M lld/Common/TargetOptionsCommandFlags.cpp
    M lld/ELF/LTO.cpp
    M lld/include/lld/Common/TargetOptionsCommandFlags.h

  Log Message:
  -----------
  Address minor review comments

Cleanup stale comments and formatting.


  Commit: aebd196a2e9fb86a57fe8fed4b1f5e53671630ff
      https://github.com/llvm/llvm-project/commit/aebd196a2e9fb86a57fe8fed4b1f5e53671630ff
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/include/llvm/LTO/LTO.h
    M llvm/lib/LTO/LTO.cpp

  Log Message:
  -----------
  Plumb the Triple through runThinLTO APIs


  Commit: 2328f18fae213154fdff35b9969f9ee339565430
      https://github.com/llvm/llvm-project/commit/2328f18fae213154fdff35b9969f9ee339565430
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M lld/include/lld/Common/TargetOptionsCommandFlags.h
    M llvm/lib/LTO/LTO.cpp

  Log Message:
  -----------
  Fix formatting


  Commit: beac971d5d15af66e803ccf87c019ea5c0f38008
      https://github.com/llvm/llvm-project/commit/beac971d5d15af66e803ccf87c019ea5c0f38008
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/lib/LTO/LTOBackend.cpp

  Log Message:
  -----------
  Restore static API name in LTOBackend.cpp


  Commit: 8641f049c46ef3b692ea07e95cc48af205c648dc
      https://github.com/llvm/llvm-project/commit/8641f049c46ef3b692ea07e95cc48af205c648dc
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/lib/LTO/LTOBackend.cpp

  Log Message:
  -----------
  Clang Format


  Commit: ac0626ed41a05f53244b174404b1f1d825cf8b37
      https://github.com/llvm/llvm-project/commit/ac0626ed41a05f53244b174404b1f1d825cf8b37
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/lib/LTO/LTOCodeGenerator.cpp

  Log Message:
  -----------
  Use ModifyTargetOptions to update DataSections


  Commit: 12cc75e0b40708af2af07c9d290b076c66a95ab6
      https://github.com/llvm/llvm-project/commit/12cc75e0b40708af2af07c9d290b076c66a95ab6
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M lld/ELF/LTO.cpp

  Log Message:
  -----------
  Save work


  Commit: 317d37b40cbff60d7c91d08b95c11b2b8fbc5262
      https://github.com/llvm/llvm-project/commit/317d37b40cbff60d7c91d08b95c11b2b8fbc5262
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M lld/ELF/LTO.cpp

  Log Message:
  -----------
  Preallocate MemoryBuffer for callback


Compare: https://github.com/llvm/llvm-project/compare/94993fdf14a5...317d37b40cbf

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