[all-commits] [llvm/llvm-project] df10da: [OpenMP] Use weak attribute in interface only for ...

Joachim via All-commits all-commits at lists.llvm.org
Fri Jul 31 11:11:16 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: df10da2ff0bd378917665fab295f025295413271
      https://github.com/llvm/llvm-project/commit/df10da2ff0bd378917665fab295f025295413271
  Author: Joachim Protze <protze at itc.rwth-aachen.de>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M openmp/runtime/src/kmp_ftn_entry.h
    M openmp/runtime/src/kmp_os.h
    M openmp/runtime/src/ompt-specific.cpp

  Log Message:
  -----------
  [OpenMP] Use weak attribute in interface only for static library

This is to address the issue reported at:
https://bugs.llvm.org/show_bug.cgi?id=46863

Since weak is meaningless for a shared library interface function, this patch
disables the attribute, when the OpenMP library is built as shared library.

ompt_start_tool is not an interface function, but a internally called function
possibly implemented by an OMPT tool.
This function needs to be weak if possible to allow overwriting ompt_start_tool
with a function implementation built into the application.

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

(cherry picked from commit 03116a9f8c2fc98577e153083aaf9b6a701ab8f9)




More information about the All-commits mailing list