[Openmp-commits] [PATCH] D69927: [libomptarget] Export __kmp_internal_end_fini to fix [Thin]LTO build

Aaron Puchert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 7 10:19:57 PST 2019


aaronpuchert added a comment.

In D69927#1737034 <https://reviews.llvm.org/D69927#1737034>, @AndreyChurbanov wrote:

> As well as removing the `__kmp_internal_end_fini` symbol at all, as it duplicates the functionality of `__kmp_internal_end_dtor` which has attribute "destructor".  I am OK with either solution, would be good to hear others opinion.


That should solve the problem, too. The destructor doesn't seem to be optimized out.

> Does anybody knows a platform where `__attribute__((destructor))` does not work?  If yes then we may need both destructors in place.

That's the interesting question. The comment saying that it doesn't work is from 2009, and might not reflect the current situation.

  // 2009-09-08 (lev): It looks the destructor does not work. In simple test cases
  // destructors work perfectly, but in real libomp.so I have no evidence it is
  // ever called. However, -fini linker option in makefile.mk works fine.

Unfortunately it doesn't tell us where this has been observed. Since it came with rOMP191506 <https://reviews.llvm.org/rOMP191506>, I would guess it was written by an Intel employee, but nobody can be expected to remember the details of this after 10 years.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69927/new/

https://reviews.llvm.org/D69927





More information about the Openmp-commits mailing list