[all-commits] [llvm/llvm-project] cac811: [OpenMP] Don't manually strip sections in the link...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Apr 15 17:35:45 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cac81161ed1386b32443e13ab513c6a3d081d6a7
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-04-15 (Fri, 15 Apr 2022)

  Changed paths:
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

  Log Message:
  [OpenMP] Don't manually strip sections in the linker wrapper

The changes in D122987 ensures that the offloading sections always have
the SHF_EXCLUDE flag. This means that we do not need to manually strip
these sections for ELF or COFF targets.

  Commit: 984a0dc386553f28068716a087d65ccf8a92889b
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-04-15 (Fri, 15 Apr 2022)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.h
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/openmp-offload-gpu.c
    M clang/test/Frontend/embed-object.c
    M clang/test/Frontend/embed-object.ll
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
    M llvm/include/llvm/Object/OffloadBinary.h
    M llvm/include/llvm/Transforms/Utils/ModuleUtils.h
    M llvm/lib/Transforms/Utils/ModuleUtils.cpp

  Log Message:
  [OpenMP] Use new offloading binary when embedding offloading images

The previous patch introduced the offloading binary format so we can
store some metada along with the binary image. This patch introduces
using this inside the linker wrapper and Clang instead of the previous
method that embedded the metadata in the section name.

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

Compare: https://github.com/llvm/llvm-project/compare/193fde7509d7...984a0dc38655

More information about the All-commits mailing list