[all-commits] [llvm/llvm-project] b1938b: [OpenMP] Disable LTO build of libomptarget and plu...

Michael Kruse via All-commits all-commits at lists.llvm.org
Thu Jan 25 16:12:25 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1938b716a3ef75a518bdebec12c240415bf0fef
      https://github.com/llvm/llvm-project/commit/b1938b716a3ef75a518bdebec12c240415bf0fef
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M openmp/libomptarget/CMakeLists.txt

  Log Message:
  -----------
  [OpenMP] Disable LTO build of libomptarget and plugins by default. (#79387)

CheckIPOSupported is used to test for working LTO since #74520. However, before CMake 3.24 this will test the default linker and ignore options such as LLVM_ENABLE_LLD. As a result, CMake would test whether LTO works with the default linker but builds with another one. In a typical scenario, libomptarget is compiled with the in-tree Clang, but linked with ld.gold, which requires the LLVMgold plugin, when it actually would work with the lld linker (or also fail because the system lld is too old to understand opaque pointers). Using gcc as the compiler would pass the test, but fail when linking with lld since does not understand gcc's LTO format.

Disable LTO by default for now since automatic detection causes too many problems. It causes the openmp-offload-cuda-project buildbot (https://lab.llvm.org/staging/#/builders/151) to fail and LLVM_ENABLE_RUNTIMES=openmp builds will have it implicitly disabled in the vast majority of system configurations anyway.




More information about the All-commits mailing list