[all-commits] [llvm/llvm-project] 6e6889: [Offloading] Embed the target features in the Offl...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Jun 23 10:15:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e6889288cdc8433f33723d977c99be5f07423f4
      https://github.com/llvm/llvm-project/commit/6e6889288cdc8433f33723d977c99be5f07423f4
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-06-23 (Thu, 23 Jun 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/openmp-offload-gpu-new.c
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
    M clang/tools/clang-offload-packager/ClangOffloadPackager.cpp

  Log Message:
  -----------
  [Offloading] Embed the target features in the OffloadBinary

The target features are necessary for correctly compiling most programs
in LTO mode. Currently, these are derived in clang at link time and
passed as an arguemnt to the linker wrapper. This is problematic because
it requires knowing the required toolchain at link time, which should
not be necessry. Instead, these features should be embedded into the
offloading binary so we can unify them in the linker wrapper for LTO.
This also required changing the offload packager to interpret multiple
arguments as concatenation with a comma. This is so we can still use the
`,` separator for the argument list.

Depends on D127246

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D127686




More information about the All-commits mailing list